X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=test%2Ftest_rpn2cql.c;h=0d929e57204649a0d36abcbfafc3f7c2a7812acf;hp=b7a511478a9896abfb3380ba3f3ba66a001b25f7;hb=d1b8a1c1647ebb00401f6b6e8f992cca7480b5f9;hpb=249f8a3fb06e57a672b21af5b00f66bdfde8633a diff --git a/test/test_rpn2cql.c b/test/test_rpn2cql.c index b7a5114..0d929e5 100644 --- a/test/test_rpn2cql.c +++ b/test/test_rpn2cql.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2013 Index Data + * Copyright (C) Index Data * See the file LICENSE for details. */ #if HAVE_CONFIG_H @@ -59,6 +59,11 @@ 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, "@or a @and b c", "a or (b and c)")); + YAZ_CHECK(compare(ct, "@or @and a b @and c d", "(a and b) or (c and d)")); + YAZ_CHECK(compare(ct, "@or @or a b @or c d", "(a or b) or (c or d)")); + YAZ_CHECK(compare(ct, "@and @and a b @and c d", "(a and b) and (c and d)")); + YAZ_CHECK(compare(ct, "@attr 1=field abc", "field=abc")); YAZ_CHECK(compare(ct, "@attr 1=4 abc", 0)); /* should fail */