X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=test%2Ftest_ccl.c;h=4841260fc43eabbf84b76e75890ae29f6e49b575;hp=d189f004a42f85ca4750fb0c072d16d57243ef77;hb=c3d7d4a659e0c4c60507a29f475d99cbee878747;hpb=05e94adc1a717e85ba5b775468c3c9e2c8a26034 diff --git a/test/test_ccl.c b/test/test_ccl.c index d189f00..4841260 100644 --- a/test/test_ccl.c +++ b/test/test_ccl.c @@ -324,22 +324,25 @@ void tst1(int pass) "@attr 5=104 a?b#c\\\\? ")); YAZ_CHECK(tst_ccl_query(bibset, "reg=\\(", - "@attr 5=102 \\\\( ")); + "( ")); YAZ_CHECK(tst_ccl_query(bibset, "z=\\(", "( ")); + YAZ_CHECK(tst_ccl_query(bibset, "z=a b#", + "@attr 5=104 \"a b#\" ")); + YAZ_CHECK(tst_ccl_query(bibset, "reg=\\\"", "\"\\\"\" ")); YAZ_CHECK(tst_ccl_query(bibset, "z=\\\"", "\"\\\"\" ")); YAZ_CHECK(tst_ccl_query(bibset, "reg=.", - "@attr 5=102 \\\\. ")); + ". ")); YAZ_CHECK(tst_ccl_query(bibset, "z=.", ". ")); YAZ_CHECK(tst_ccl_query(bibset, "reg=\".\"", - "@attr 5=102 \\\\. ")); + ". ")); YAZ_CHECK(tst_ccl_query(bibset, "z=\".\"", ". ")); @@ -349,14 +352,14 @@ void tst1(int pass) "@attr 5=104 ?\\\\? ")); YAZ_CHECK(tst_ccl_query(bibset, "reg=\"?\\?\"", - "@attr 5=102 \\\\?\\\\? ")); + "?? ")); YAZ_CHECK(tst_ccl_query(bibset, "z=\"?\\?\"", - "@attr 5=104 \\\\?\\\\? ")); + "?? ")); YAZ_CHECK(tst_ccl_query(bibset, "reg=\\\\", - "@attr 5=102 \\\\\\\\ ")); + "\\\\ ")); YAZ_CHECK(tst_ccl_query(bibset, "z=\\\\", - "@attr 5=104 \\\\\\\\ ")); + "\\\\ ")); YAZ_CHECK(tst_ccl_query(bibset, "\\\\", "@attr 4=2 @attr 1=1016 \\\\ ")); @@ -432,6 +435,9 @@ void tst2(void) YAZ_CHECK(tst_ccl_query(bibset, "a?#", "@attr 5=104 @attr 4=2 @attr 1=1016 a?# ")); + YAZ_CHECK(tst_ccl_query(bibset, "a b?#", + "@and @attr 4=2 @attr 1=1016 a @attr 5=104 @attr 4=2 @attr 1=1016 b?# ")); + YAZ_CHECK(tst_ccl_query(bibset, "a*", "@attr 4=2 @attr 1=1016 a* ")); @@ -443,7 +449,7 @@ void tst2(void) "@attr 5=104 @attr 4=2 @attr 1=1016 a? ")); YAZ_CHECK(tst_ccl_query(bibset, "a?", - "@attr 5=104 @attr 4=2 @attr 1=1016 a\\\\? ")); + "@attr 4=2 @attr 1=1016 a? ")); ccl_qual_fitem(bibset, "?", "@mask"); YAZ_CHECK(tst_ccl_query(bibset, "a?", @@ -453,7 +459,7 @@ void tst2(void) ccl_qual_fitem(bibset, "", "@mask"); ccl_qual_fitem(bibset, "", "@truncation"); YAZ_CHECK(tst_ccl_query(bibset, "a?#", - "@attr 5=104 @attr 4=2 @attr 1=1016 a\\\\?\\\\# ")); + "@attr 4=2 @attr 1=1016 a?# ")); ccl_qual_fitem(bibset, "og", "@and"); ccl_qual_fitem(bibset, "eller", "@or");