Excuse me, I have met some problem while writing test cases for api_termgen.
I added a case for mixed CJK numbers to test_simple,
as the example mentioned in #699:> { "", "2千3百", "2[1] 千[2] 3[3] 百[4]"}
But it unexpectedly failed.
Below are the input and output.
I run test with command:> ./runtest ./apitest termgen1
And the test case output is:> Running test: termgen1... FAILED
> Text: simple-example
> Text: simple-example
> Text: I.B.M.
> Text: I.B.M
> Text: I.B.
> Text: I.B
> Text: I.
> Setting stemmer to: en
> Text: I.B.M.
> Text: I.B.M
> Text: I.B.
> Text: I.B
> Text: I.
> Text: I.B.M. P.C.
> Text: I.B.M P.C.
> Text: 1.0 1000,000.99 0.9.9,
> Text: Pi is 3.1415926536 approximately
> Text: 2千3百
>
> ./apitest backend none: 0 tests passed, 1 failed.
> Running tests with backend "inmemory"...
> Running tests with backend "glass"...
> Running tests with backend "singlefile_glass"...
> Running tests with backend "multi_glass"...
> Running tests with backend "remoteprog_glass"...
> Running tests with backend "remotetcp_glass"...
> ./apitest total: 0 tests passed, 1 failed.
How to predicate the 'expect' string?
==while reading the code in xapian-core/tests/api_termgen.cc,
I found the test assertion may be this:
> TEST_STRINGS_EQUAL(output, expect);
I guess the order of terms in 'expect' string is fixed, is that right?
And if my guess is right, how to predicate the order?
How to print the args of TEST_STRINGS_EQUAL?
==with reading the code of TEST_STRINGS_EQUAL,
I think it should print the input args if they are different.
However, I got nothing but "Text: 2千3百" in previous output,
are there preconditions to enable it?
Cheers,
outdream