From 49873e8213488678ae95c0789aff12462f80d181 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 14 Oct 2009 16:32:24 +0200 Subject: [PATCH] Test case for setting overrides --- test/Makefile.am | 13 +++++++++---- test/set2/1.xml | 6 ++++++ test/set2/2.xml | 7 +++++++ test/set2/3.xml | 5 +++++ test/test_settings.cfg | 24 ++++++++++++++++++++++++ test/test_settings.sh | 14 ++++++++++++++ test/test_settings_1.res | 2 ++ test/test_settings_2.res | 2 ++ test/test_settings_3.res | 16 ++++++++++++++++ test/test_settings_urls | 4 ++++ 10 files changed, 89 insertions(+), 4 deletions(-) create mode 100644 test/set2/1.xml create mode 100644 test/set2/2.xml create mode 100644 test/set2/3.xml create mode 100644 test/test_settings.cfg create mode 100755 test/test_settings.sh create mode 100644 test/test_settings_1.res create mode 100644 test/test_settings_2.res create mode 100644 test/test_settings_3.res create mode 100644 test/test_settings_urls diff --git a/test/Makefile.am b/test/Makefile.am index 94bf11c..d026ca3 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,10 +1,13 @@ # This file is part of Pazpar2. -check_SCRIPTS = test_http.sh test_icu.sh test_post.sh +check_SCRIPTS = test_http.sh test_icu.sh test_post.sh test_settings.sh EXTRA_DIST = run_pazpar2.sh marc21.xsl z3950_indexdata_com_marc.xml \ gils_service.xml marc_service.xml marc21.mmap \ - test_http.cfg test_http_urls test_icu.cfg test_icu_urls \ - test_post.cfg test_post_urls $(check_SCRIPTS) + test_http.cfg test_http_urls \ + test_icu.cfg test_icu_urls \ + test_post.cfg test_post_urls \ + test_settings.cfg test_settings_urls \ + $(check_SCRIPTS) TESTS = $(check_SCRIPTS) @@ -16,4 +19,6 @@ dist-hook: cp ${srcdir}/test_http_*.res $(distdir) cp ${srcdir}/test_icu_*.res $(distdir) cp ${srcdir}/test_post_*.res $(distdir) - + cp ${srcdir}/test_settings_*.res $(distdir) + mkdir $(distdir)/set2 + cp ${srcdir}/set2/*.xml $(distdir)/set2 diff --git a/test/set2/1.xml b/test/set2/1.xml new file mode 100644 index 0000000..fed01f4 --- /dev/null +++ b/test/set2/1.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/test/set2/2.xml b/test/set2/2.xml new file mode 100644 index 0000000..c2ea92f --- /dev/null +++ b/test/set2/2.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/test/set2/3.xml b/test/set2/3.xml new file mode 100644 index 0000000..ad047e6 --- /dev/null +++ b/test/set2/3.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/test/test_settings.cfg b/test/test_settings.cfg new file mode 100644 index 0000000..cacd2c1 --- /dev/null +++ b/test/test_settings.cfg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + diff --git a/test/test_settings.sh b/test/test_settings.sh new file mode 100755 index 0000000..ce6b03a --- /dev/null +++ b/test/test_settings.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# + +# srcdir might be set by make +srcdir=${srcdir:-"."} + +# Test using test_http.cfg +exec ${srcdir}/run_pazpar2.sh test_settings + +# Local Variables: +# mode:shell-script +# sh-indentation: 2 +# sh-basic-offset: 4 +# End: diff --git a/test/test_settings_1.res b/test/test_settings_1.res new file mode 100644 index 0000000..81ff9ff --- /dev/null +++ b/test/test_settings_1.res @@ -0,0 +1,2 @@ + +OK11 \ No newline at end of file diff --git a/test/test_settings_2.res b/test/test_settings_2.res new file mode 100644 index 0000000..ab63fe6 --- /dev/null +++ b/test/test_settings_2.res @@ -0,0 +1,2 @@ + +OK \ No newline at end of file diff --git a/test/test_settings_3.res b/test/test_settings_3.res new file mode 100644 index 0000000..b530805 --- /dev/null +++ b/test/test_settings_3.res @@ -0,0 +1,16 @@ + +OK +z3950.indexdata.com/marc +Target name +0 +0 +0 +Client_Idle + + + + + + + + \ No newline at end of file diff --git a/test/test_settings_urls b/test/test_settings_urls new file mode 100644 index 0000000..cc990c1 --- /dev/null +++ b/test/test_settings_urls @@ -0,0 +1,4 @@ +http://localhost:9763/search.pz2?session=1&command=init +http://localhost:9763/search.pz2?session=1&command=search&query=water +2 +http://localhost:9763/search.pz2?session=1&command=bytarget&settings=1 -- 1.7.10.4