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:
b68bf3d
)
Test that would have caught the truncation flags switch
author
Dennis Schafroth
<dennis@indexdata.com>
Thu, 7 Apr 2011 11:41:40 +0000
(13:41 +0200)
committer
Dennis Schafroth
<dennis@indexdata.com>
Thu, 7 Apr 2011 11:41:40 +0000
(13:41 +0200)
test/test_rpn2solr.c
patch
|
blob
|
history
diff --git
a/test/test_rpn2solr.c
b/test/test_rpn2solr.c
index
a5956dd
..
2f3f01e
100644
(file)
--- a/
test/test_rpn2solr.c
+++ b/
test/test_rpn2solr.c
@@
-70,6
+70,17
@@
static void tst1(void)
solr_transform_define_pattern(ct, "index.foo", "1=bar");
YAZ_CHECK(compare(ct, "@attr 1=bar abc", "foo:abc"));
solr_transform_define_pattern(ct, "index.foo", "1=bar");
YAZ_CHECK(compare(ct, "@attr 1=bar abc", "foo:abc"));
+
+ /* Truncation */
+ YAZ_CHECK(compare(ct, "@attr 5=1 water", "water*"));
+ YAZ_CHECK(compare(ct, "@attr t=r water", "water*"));
+
+ YAZ_CHECK(compare(ct, "@attr 5=2 water", "*water"));
+ YAZ_CHECK(compare(ct, "@attr t=l water", "*water"));
+
+ YAZ_CHECK(compare(ct, "@attr 5=3 water", "*water*"));
+ YAZ_CHECK(compare(ct, "@attr t=b water", "*water*"));
+
/*
YAZ_CHECK(compare(ct, "@or @attr 1=1016 water @attr 7=1 @attr 1=4 0", "any:water rank:??");
*/
/*
YAZ_CHECK(compare(ct, "@or @attr 1=1016 water @attr 7=1 @attr 1=4 0", "any:water rank:??");
*/