From: Dennis Schafroth Date: Thu, 7 Apr 2011 11:42:50 +0000 (+0200) Subject: Test for truncation. Not sure how CQL handles it X-Git-Tag: v4.2.0~46^2~5 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=801004d08d99b46b34f9a1b2342b9a5c13337d95;p=yaz-moved-to-github.git Test for truncation. Not sure how CQL handles it --- diff --git a/test/test_rpn2cql.c b/test/test_rpn2cql.c index cb2dacb..73f5f5f 100644 --- a/test/test_rpn2cql.c +++ b/test/test_rpn2cql.c @@ -82,15 +82,17 @@ static void tst2(void) YAZ_CHECK(compare(ct, "@attr 1=4 abc", "dc.title=abc")); YAZ_CHECK(compare(ct, "@attr 1=4 @attr 4=108 abc", "dc.title=/exact abc")); YAZ_CHECK(compare(ct, "@attr 1=4 @attr 3=1 @attr 6=1 abc", "dc.title=abc")); - YAZ_CHECK(compare(ct, "@attr 1=4 @attr 4=1 @attr 6=1 abc", - "dc.title=abc")); + YAZ_CHECK(compare(ct, "@attr 1=4 @attr 4=1 @attr 6=1 abc", "dc.title=abc")); YAZ_CHECK(compare(ct, "@attr 1=1016 abc", "abc")); + /* Date tests */ YAZ_CHECK(compare(ct, "@attr 2=1 @attr 1=30 1980", "dc.date<1980")); YAZ_CHECK(compare(ct, "@attr 1=30 @attr 2=3 1980", "dc.date=1980")); 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")); + /* Other */ YAZ_CHECK(compare(ct, "@attr 2=103 @attr 1=_ALLRECORDS 1", "cql.allRecords=1")); YAZ_CHECK(compare(ct, "@attr 1=500 abc", 0)); cql_transform_close(ct);