X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Ftest_rpn2cql.c;h=72e999cb85d7e7e0553548f9ee6616b699963418;hb=58b73e42cc56014e9a1f57474884c6bd4e97ccc1;hp=387cb88b3c3e588c04af0635bb907b890c64043b;hpb=85a0aae5ecc05652b0cf16aae811d64846835f80;p=yaz-moved-to-github.git diff --git a/test/test_rpn2cql.c b/test/test_rpn2cql.c index 387cb88..72e999c 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-2011 Index Data + * Copyright (C) 1995-2012 Index Data * See the file LICENSE for details. */ #if HAVE_CONFIG_H @@ -21,7 +21,7 @@ static int compare(cql_transform_t ct, const char *pqf, const char *cql) ODR odr = odr_createmem(ODR_ENCODE); WRBUF w = wrbuf_alloc(); Z_RPNQuery *q = p_query_rpn(odr, pqf); - + if (q) { int r = cql_transform_rpn2cql_wrbuf(ct, w, q); @@ -54,7 +54,7 @@ static int compare(cql_transform_t ct, const char *pqf, const char *cql) static void tst1(void) { - cql_transform_t ct = cql_transform_create(); + cql_transform_t ct = cql_transform_create(); YAZ_CHECK(compare(ct, "abc", "\"abc\"")); YAZ_CHECK(compare(ct, "\"a b c\"", "\"a b c\"")); @@ -82,7 +82,7 @@ static void tst2(void) wrbuf_puts(w, "/"); } wrbuf_puts(w, "../etc/pqf.properties"); - + ct = cql_transform_open_fname(wrbuf_cstr(w)); YAZ_CHECK(compare(ct, "@attr 1=4 abc", "dc.title=\"abc\"")); YAZ_CHECK(compare(ct, "@attr 1=4 @attr 4=108 abc", "dc.title=/exact \"abc\""));