From: Dennis Schafroth Date: Thu, 7 Apr 2011 12:06:14 +0000 (+0200) Subject: Add truncation tests X-Git-Tag: v4.2.0~46^2~3 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=617f469c9c7f5846d4ae3d53ac17616a09a49415;p=yaz-moved-to-github.git Add truncation tests --- diff --git a/test/test_rpn2cql.c b/test/test_rpn2cql.c index 73f5f5f..bdb4972 100644 --- a/test/test_rpn2cql.c +++ b/test/test_rpn2cql.c @@ -90,8 +90,10 @@ static void tst2(void) YAZ_CHECK(compare(ct, "@attr 1=30 @attr 2=5 1980", "dc.date>1980")); YAZ_CHECK(compare(ct, "@attr 1=30 @attr 2=2 1980", "dc.date<=1980")); YAZ_CHECK(compare(ct, "@attr 1=30 @attr 2=4 1980", "dc.date>=1980")); - /* truncation tests */ - YAZ_CHECK(compare(ct, "@attr 1=1016 @attr 5=r abc", "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*")); /* Other */ YAZ_CHECK(compare(ct, "@attr 2=103 @attr 1=_ALLRECORDS 1", "cql.allRecords=1")); YAZ_CHECK(compare(ct, "@attr 1=500 abc", 0));