From 6985b22c1da4a0c4d4182a6b0570df490a913403 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 19 Aug 2009 21:00:27 +0200 Subject: [PATCH] New tests cases for CQL to RPN conv --- test/tst_rpn2cql.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/tst_rpn2cql.c b/test/tst_rpn2cql.c index 34e6de2..8867ac9 100644 --- a/test/tst_rpn2cql.c +++ b/test/tst_rpn2cql.c @@ -51,7 +51,8 @@ static void tst1(void) YAZ_CHECK(compare(ct, "abc", "abc")); YAZ_CHECK(compare(ct, "\"a b c\"", "\"a b c\"")); YAZ_CHECK(compare(ct, "@and a b", "a and b")); - YAZ_CHECK(compare(ct, "@attr 1=4 abc", "abc")); + YAZ_CHECK(compare(ct, "@attr 1=field abc", "field=abc")); + YAZ_CHECK(compare(ct, "@attr 1=4 abc", 0)); /* should fail */ cql_transform_define_pattern(ct, "index.title", "1=4"); YAZ_CHECK(compare(ct, "@attr 1=4 abc", "title=abc")); @@ -88,6 +89,7 @@ static void tst2(void) YAZ_CHECK(compare(ct, "@attr 1=30 @attr 2=4 1980", "dc.date>=1980")); 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); wrbuf_destroy(w); } -- 1.7.10.4