X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=test%2Ftest_solr.c;h=a2bfc06ef9550500c9d7dc2bb3a77da291e07dc2;hp=98d06e8b490103605e4829986bc004e003d6b579;hb=d7cba4993e5c7c06c655d9a1d903f889fdee8329;hpb=33d0d214a9219e190e15779b4e4f5e31fd7946be diff --git a/test/test_solr.c b/test/test_solr.c index 98d06e8..a2bfc06 100644 --- a/test/test_solr.c +++ b/test/test_solr.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 @@ -69,7 +69,8 @@ void tst_encoding(void) sr->u.request->query = "title:solr"; YAZ_CHECK(compare_solr_req( odr, sr, 0, - "GET Default/select?q=title%3Asolr HTTP/1.1\r\n" + "GET Default/select?defType=lucene&q=title%3Asolr " + "HTTP/1.1\r\n" "User-Agent: YAZ/" YAZ_VERSION "\r\n" "Host: localhost\r\n" "Content-Type: text/xml\r\n\r\n")); @@ -81,7 +82,8 @@ void tst_encoding(void) sr->u.request->query = "title:solr"; YAZ_CHECK(compare_solr_req( odr, sr, "utf-8", - "GET Default/select?q=title%3Asolr HTTP/1.1\r\n" + "GET Default/select?defType=lucene&q=title%3Asolr " + "HTTP/1.1\r\n" "User-Agent: YAZ/" YAZ_VERSION "\r\n" "Host: localhost\r\n" "Content-Type: text/xml; charset=utf-8\r\n\r\n")); @@ -97,7 +99,8 @@ void tst_encoding(void) YAZ_CHECK(compare_solr_req( odr, sr, 0, - "GET Default/select?q=title%3Asolr&start=2&rows=10" + "GET Default/select?defType=lucene&q=title%3Asolr&" + "start=2&rows=10" " HTTP/1.1\r\n" "User-Agent: YAZ/" YAZ_VERSION "\r\n" "Host: localhost\r\n" @@ -116,7 +119,8 @@ void tst_encoding(void) YAZ_CHECK(compare_solr_req( odr, sr, 0, - "GET Default/select?q=title%3Asolr&start=2&rows=10" + "GET Default/select?defType=lucene&q=title%3Asolr&" + "start=2&rows=10" "&facet=true&facet.mincount=1&facet.field=date" "&facet.field=title_exact&f.title_exact.facet.limit=17" " HTTP/1.1\r\n" @@ -348,6 +352,20 @@ void tst_yaz_700(void) r = z_GDU(odr, &gdu_req, 0, 0); YAZ_CHECK(r); + if (r) + { + int len; + char *buf = odr_getbuf(odr, &len, 0); + ODR decode = odr_createmem(ODR_DECODE); + YAZ_CHECK(buf); + if (buf) + { + odr_setbuf(decode, buf, len, 0); + r = z_GDU(decode, &gdu_req, 0, 0); + YAZ_CHECK(r); + } + odr_destroy(decode); + } odr_destroy(odr); }