X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=test%2Ftst_rpn2cql.c;h=8867ac90ddba9b914da6509a37d2f6467d8e4f28;hp=29e4616e9489b4ae20544e04ef86995f38b76d12;hb=6985b22c1da4a0c4d4182a6b0570df490a913403;hpb=8e9d2cec97def1cd8b89b1fe427f1a232661ec6f diff --git a/test/tst_rpn2cql.c b/test/tst_rpn2cql.c index 29e4616..8867ac9 100644 --- a/test/tst_rpn2cql.c +++ b/test/tst_rpn2cql.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2008 Index Data + * Copyright (C) 1995-2009 Index Data * See the file LICENSE for details. */ @@ -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); } @@ -104,6 +106,7 @@ int main (int argc, char **argv) /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab