X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Ftest_rpn2solr.c;h=a5956dd59ab5e51ad49c8e689e196fbd62343b81;hb=9885c9c651e293561fad21cbc7d01b6b7b47e5c2;hp=c7aa1e9d6f76ea35d0dbc93d5f0ab7f5dc64b56e;hpb=bb8c1303f5ffddd9dec1e3527f64fdaaa397698e;p=yaz-moved-to-github.git diff --git a/test/test_rpn2solr.c b/test/test_rpn2solr.c index c7aa1e9..a5956dd 100644 --- a/test/test_rpn2solr.c +++ b/test/test_rpn2solr.c @@ -1,7 +1,10 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2010 Index Data + * Copyright (C) 1995-2011 Index Data * See the file LICENSE for details. */ +#if HAVE_CONFIG_H +#include +#endif #include #include @@ -59,6 +62,7 @@ static void tst1(void) YAZ_CHECK(compare(ct, "@and a b", "a AND b")); YAZ_CHECK(compare(ct, "@or a b", "a OR b")); YAZ_CHECK(compare(ct, "@attr 1=field abc", "field:abc")); + YAZ_CHECK(compare(ct, "@attr 1=field \"a b c\"", "field:\"a b c\"")); YAZ_CHECK(compare(ct, "@attr 1=4 abc", 0)); /* should fail */ solr_transform_define_pattern(ct, "index.title", "1=4"); @@ -66,6 +70,9 @@ static void tst1(void) solr_transform_define_pattern(ct, "index.foo", "1=bar"); YAZ_CHECK(compare(ct, "@attr 1=bar abc", "foo:abc")); + /* + YAZ_CHECK(compare(ct, "@or @attr 1=1016 water @attr 7=1 @attr 1=4 0", "any:water rank:??"); + */ solr_transform_close(ct); }