# 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)
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
--- /dev/null
+<settings target="*">
+
+ <set name="pz:elements" value="F"/>
+ <set precedence="10" name="pz:cclmap:term" value="u=host_wildcard"/>
+ <set name="pz:requestsyntax" value="sutrs"/>
+</settings>
--- /dev/null
+<settings target="z3950.indexdata.com/*">
+
+ <set name="pz:elements" value="F"/>
+ <set name="pz:cclmap:term" value="u=db_wildcard"/>
+ <set name="pz:requestsyntax" value="marc21"/>
+
+</settings>
--- /dev/null
+<settings target="z3950.indexdata.com/marc">
+ <set name="pz:name" value="Target name"/>
+ <set name="pz:elements" value="F"/>
+ <set name="pz:cclmap:term" value="u=1016"/>
+</settings>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<pazpar2 xmlns="http://www.indexdata.com/pazpar2/1.0">
+
+ <server>
+ <listen port="9763"/>
+ <settings src="set2"/>
+
+ <service>
+ <!-- we try to keep same order as in marc21.xsl -->
+ <metadata name="id" brief="yes"/>
+ <metadata name="lccn" merge="unique"/>
+ <metadata name="author" brief="yes" termlist="yes" merge="unique" rank="2"/>
+ <metadata name="title" brief="yes" sortkey="skiparticle"
+ merge="longest" rank="6"/>
+ </service>
+ </server>
+
+</pazpar2>
+<!-- Keep this comment at the end of the file
+ Local variables:
+ mode: nxml
+ End:
+-->
+
--- /dev/null
+#!/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:
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<init><status>OK</status><session>1</session><protocol>1</protocol></init>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<search><status>OK</status></search>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<bytarget><status>OK</status>
+<target><id>z3950.indexdata.com/marc</id>
+<name>Target name</name>
+<hits>0</hits>
+<diagnostic>0</diagnostic>
+<records>0</records>
+<state>Client_Idle</state>
+<settings>
+<set name="pz:elements" value="F"/>
+<set name="pz:requestsyntax" value="marc21"/>
+<set name="pz:cclmap:term" value="u=host_wildcard"/>
+<set name="pz:id" value="z3950.indexdata.com/marc"/>
+<set name="pz:name" value="Target name"/>
+</settings>
+</target></bytarget>
\ No newline at end of file
--- /dev/null
+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