projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
c134168
)
CCL: tests for configurable mask/truncation
author
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 29 May 2013 08:43:24 +0000
(10:43 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 29 May 2013 08:43:24 +0000
(10:43 +0200)
test/test_ccl.c
patch
|
blob
|
history
diff --git
a/test/test_ccl.c
b/test/test_ccl.c
index
9e2b927
..
d189f00
100644
(file)
--- 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");
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* "));
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\\\\? "));
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");
ccl_qual_fitem(bibset, "og", "@and");
ccl_qual_fitem(bibset, "eller", "@or");
ccl_qual_fitem(bibset, "ikke", "@not");