X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Ftest_rpn2solr.c;h=1fc16952214116b839a1183666d634908255294b;hb=4c5aa7d3ec9d1fe3fff1473e56b5690450ef4311;hp=b4a690eb018f050d95f5864df1e3e087d539c683;hpb=d0e351c12fff564d876958e860338d43716dc269;p=yaz-moved-to-github.git diff --git a/test/test_rpn2solr.c b/test/test_rpn2solr.c index b4a690e..1fc1695 100644 --- a/test/test_rpn2solr.c +++ b/test/test_rpn2solr.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2010 Index Data + * Copyright (C) 1995-2011 Index Data * See the file LICENSE for details. */ #if HAVE_CONFIG_H @@ -70,6 +70,12 @@ static void tst1(void) 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 5=2 water", "*water")); + YAZ_CHECK(compare(ct, "@attr 5=3 water", "*water*")); + /* YAZ_CHECK(compare(ct, "@or @attr 1=1016 water @attr 7=1 @attr 1=4 0", "any:water rank:??"); */