From: Dennis Schafroth Date: Fri, 23 Aug 2013 10:47:13 +0000 (+0200) Subject: Re-arrange. Add "range" test (covered by other tests) X-Git-Tag: v4.2.66~14 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=249f8a3fb06e57a672b21af5b00f66bdfde8633a;p=yaz-moved-to-github.git Re-arrange. Add "range" test (covered by other tests) --- diff --git a/test/test_rpn2cql.c b/test/test_rpn2cql.c index 3704bb1..b7a5114 100644 --- a/test/test_rpn2cql.c +++ b/test/test_rpn2cql.c @@ -90,11 +90,12 @@ static void tst2(void) 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=1 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=3 1980", "dc.date=1980")); YAZ_CHECK(compare(ct, "@attr 1=30 @attr 2=4 1980", "dc.date>=1980")); + YAZ_CHECK(compare(ct, "@attr 1=30 @attr 2=5 1980", "dc.date>1980")); + YAZ_CHECK(compare(ct, "@and @attr 1=30 @attr 2=4 234 @attr 1=30 @attr 2=2 1990", "dc.date>=234 and dc.date<=1990")); /* Truncation */ YAZ_CHECK(compare(ct, "@attr 5=1 water", "water*"));