Rename tstquery to test_query
authorAdam Dickmeiss <adam@indexdata.dk>
Sat, 5 Oct 2013 14:10:08 +0000 (16:10 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Sat, 5 Oct 2013 14:10:08 +0000 (16:10 +0200)
src/Makefile.am
src/test_query.cpp [new file with mode: 0644]
src/tstquery.cpp [deleted file]

index b79b6d1..2d3621a 100644 (file)
@@ -1,5 +1,5 @@
 
-check_PROGRAMS = tstquery
+check_PROGRAMS = test_query
 noinst_PROGRAMS = yaz-my-server yaz-my-client
 bin_SCRIPTS = yazpp-config
 
@@ -27,6 +27,6 @@ yaz_my_client_SOURCES=yaz-my-client.cpp
 
 yaz_my_server_SOURCES=yaz-my-server.cpp yaz-marc-sample.cpp
 
-tstquery_SOURCES=tstquery.cpp
+test_query_SOURCES=test_query.cpp
 
 LDADD=libyazpp.la $(YAZLALIB)
diff --git a/src/test_query.cpp b/src/test_query.cpp
new file mode 100644 (file)
index 0000000..28acf6a
--- /dev/null
@@ -0,0 +1,55 @@
+/* This file is part of the yazpp toolkit.
+ * Copyright (C) 1998-2013 Index Data and Mike Taylor
+ * See the file LICENSE for details.
+ */
+
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <stdlib.h>
+#include <yazpp/z-query.h>
+#include <yaz/test.h>
+#include <yaz/log.h>
+
+using namespace yazpp_1;
+
+int tst1(const char *query_str_in, const char *query_expected)
+{
+    Yaz_Z_Query q;
+
+    q = query_str_in;
+
+    Yaz_Z_Query q2;
+
+    q2 = q;
+
+    char query_str_out[100];
+    q2.print(query_str_out, sizeof(query_str_out)-1);
+
+    if (strcmp(query_str_out, query_expected))
+    {
+       yaz_log(YLOG_LOG, "query mismatch out=%s expected=%s",
+               query_str_out, query_expected);
+        return 0;
+    }
+    return 1;
+}
+
+int main(int argc, char **argv)
+{
+    YAZ_CHECK_INIT(argc, argv);
+    YAZ_CHECK(tst1("", ""));
+    YAZ_CHECK(tst1("x", "RPN @attrset Bib-1 x"));
+    YAZ_CHECK(tst1("@and a b", "RPN @attrset Bib-1 @and a b"));
+    YAZ_CHECK_TERM;
+}
+
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * c-file-style: "Stroustrup"
+ * indent-tabs-mode: nil
+ * End:
+ * vim: shiftwidth=4 tabstop=8 expandtab
+ */
+
diff --git a/src/tstquery.cpp b/src/tstquery.cpp
deleted file mode 100644 (file)
index 28acf6a..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/* This file is part of the yazpp toolkit.
- * Copyright (C) 1998-2013 Index Data and Mike Taylor
- * See the file LICENSE for details.
- */
-
-#if HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <stdlib.h>
-#include <yazpp/z-query.h>
-#include <yaz/test.h>
-#include <yaz/log.h>
-
-using namespace yazpp_1;
-
-int tst1(const char *query_str_in, const char *query_expected)
-{
-    Yaz_Z_Query q;
-
-    q = query_str_in;
-
-    Yaz_Z_Query q2;
-
-    q2 = q;
-
-    char query_str_out[100];
-    q2.print(query_str_out, sizeof(query_str_out)-1);
-
-    if (strcmp(query_str_out, query_expected))
-    {
-       yaz_log(YLOG_LOG, "query mismatch out=%s expected=%s",
-               query_str_out, query_expected);
-        return 0;
-    }
-    return 1;
-}
-
-int main(int argc, char **argv)
-{
-    YAZ_CHECK_INIT(argc, argv);
-    YAZ_CHECK(tst1("", ""));
-    YAZ_CHECK(tst1("x", "RPN @attrset Bib-1 x"));
-    YAZ_CHECK(tst1("@and a b", "RPN @attrset Bib-1 @and a b"));
-    YAZ_CHECK_TERM;
-}
-
-/*
- * Local variables:
- * c-basic-offset: 4
- * c-file-style: "Stroustrup"
- * indent-tabs-mode: nil
- * End:
- * vim: shiftwidth=4 tabstop=8 expandtab
- */
-