From: Adam Dickmeiss Date: Wed, 29 May 2013 08:43:24 +0000 (+0200) Subject: CCL: tests for configurable mask/truncation X-Git-Tag: v4.2.58~9 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=05e94adc1a717e85ba5b775468c3c9e2c8a26034;p=yaz-moved-to-github.git CCL: tests for configurable mask/truncation --- diff --git a/test/test_ccl.c b/test/test_ccl.c index 9e2b927..d189f00 100644 --- a/test/test_ccl.c +++ b/test/test_ccl.c @@ -429,6 +429,9 @@ void tst2(void) ccl_qual_fitem(bibset, "u=4 s=pw t=l,r", "ti"); ccl_qual_fitem(bibset, "1=1016 s=al,pw t=z", "term"); + YAZ_CHECK(tst_ccl_query(bibset, "a?#", + "@attr 5=104 @attr 4=2 @attr 1=1016 a?# ")); + YAZ_CHECK(tst_ccl_query(bibset, "a*", "@attr 4=2 @attr 1=1016 a* ")); @@ -442,6 +445,16 @@ void tst2(void) YAZ_CHECK(tst_ccl_query(bibset, "a?", "@attr 5=104 @attr 4=2 @attr 1=1016 a\\\\? ")); + ccl_qual_fitem(bibset, "?", "@mask"); + YAZ_CHECK(tst_ccl_query(bibset, "a?", + "@attr 5=104 @attr 4=2 @attr 1=1016 a# ")); + + + 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\\\\?\\\\# ")); + ccl_qual_fitem(bibset, "og", "@and"); ccl_qual_fitem(bibset, "eller", "@or"); ccl_qual_fitem(bibset, "ikke", "@not");