1 /* This file is part of the yazpp toolkit.
2 * Copyright (C) 1998-2013 Index Data and Mike Taylor
3 * See the file LICENSE for details.
10 #include <yazpp/z-query.h>
14 using namespace yazpp_1;
16 int tst1(const char *query_str_in, const char *query_expected)
26 char query_str_out[100];
27 q2.print(query_str_out, sizeof(query_str_out)-1);
29 if (strcmp(query_str_out, query_expected))
31 yaz_log(YLOG_LOG, "query mismatch out=%s expected=%s",
32 query_str_out, query_expected);
38 int main(int argc, char **argv)
40 YAZ_CHECK_INIT(argc, argv);
41 YAZ_CHECK(tst1("", ""));
42 YAZ_CHECK(tst1("x", "RPN @attrset Bib-1 x"));
43 YAZ_CHECK(tst1("@and a b", "RPN @attrset Bib-1 @and a b"));
50 * c-file-style: "Stroustrup"
51 * indent-tabs-mode: nil
53 * vim: shiftwidth=4 tabstop=8 expandtab