From 617f469c9c7f5846d4ae3d53ac17616a09a49415 Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Thu, 7 Apr 2011 14:06:14 +0200 Subject: [PATCH] Add truncation tests --- test/test_rpn2cql.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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)); -- 1.7.10.4