X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Ftst_query_charset.c;h=1c3bb18bbda6df5ed38f3b2703b90ab78dc4936f;hb=173f78f50536784bdc6a59d4586ba409b2b69182;hp=c597e653ae6cfee711f07417bb35415d0cd1a7f7;hpb=3bfe867a001cb4e4f88d47541f77a21027719bd5;p=yaz-moved-to-github.git diff --git a/test/tst_query_charset.c b/test/tst_query_charset.c index c597e65..1c3bb18 100644 --- a/test/tst_query_charset.c +++ b/test/tst_query_charset.c @@ -1,14 +1,13 @@ -/* - * Copyright (C) 1995-2007, Index Data ApS +/* This file is part of the YAZ toolkit. + * Copyright (C) 1995-2009 Index Data * See the file LICENSE for details. - * - * $Id: tst_query_charset.c,v 1.1 2007-04-10 14:42:31 adam Exp $ */ #include #include #include +#include #include #include #include @@ -42,7 +41,10 @@ enum query_charset_status t(yaz_iconv_t cd, else { WRBUF w = wrbuf_alloc(); + Z_RPNQuery *r2 = yaz_copy_z_RPNQuery(rpn, odr); + YAZ_CHECK(r2); + YAZ_CHECK(r2 != rpn); yaz_query_charset_convert_rpnquery(rpn, odr, cd); yaz_rpnquery_to_wrbuf(w, rpn); if (!expect_pqf || strcmp(expect_pqf, wrbuf_cstr(w)) == 0) @@ -85,6 +87,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