Add test for no target facets, e.g. backwards compatibility
authorDennis Schafroth <dennis@indexdata.com>
Mon, 16 Aug 2010 11:52:28 +0000 (13:52 +0200)
committerDennis Schafroth <dennis@indexdata.com>
Mon, 16 Aug 2010 11:52:28 +0000 (13:52 +0200)
Downgrade facet test to run with yaz 4.0.11 (devl only, but not tested).
Revert to yaz 4.0.12 as soon as released.

test/test_facets.sh
test/test_facets_20.res [new file with mode: 0644]
test/test_facets_21.res [new file with mode: 0644]
test/test_facets_22.res [new file with mode: 0644]
test/test_facets_23.res [new file with mode: 0644]
test/test_facets_24.res [new file with mode: 0644]
test/test_facets_urls

index 506dd64..1ad053c 100755 (executable)
@@ -10,7 +10,7 @@ F=''
 for p in $PATH; do
     if test -x $p/yaz-ztest -a -x $p/yaz-config; then
        VERSION=`$p/yaz-config -V|awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
-       if test $VERSION -ge 4000012; then
+       if test $VERSION -ge 4000011; then
            F=$p/yaz-ztest
             break
        fi
diff --git a/test/test_facets_20.res b/test/test_facets_20.res
new file mode 100644 (file)
index 0000000..2b3989e
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<init><status>OK</status><session>2</session><protocol>1</protocol></init>
\ No newline at end of file
diff --git a/test/test_facets_21.res b/test/test_facets_21.res
new file mode 100644 (file)
index 0000000..42534e3
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<settings><status>OK</status></settings>
\ No newline at end of file
diff --git a/test/test_facets_22.res b/test/test_facets_22.res
new file mode 100644 (file)
index 0000000..ab63fe6
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<search><status>OK</status></search>
\ No newline at end of file
diff --git a/test/test_facets_23.res b/test/test_facets_23.res
new file mode 100644 (file)
index 0000000..7d46c04
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<show>
+<status>OK</status>
+<activeclients>1</activeclients>
+<merged>1</merged>
+<total>2</total>
+<start>0</start>
+<num>1</num>
+<hit>
+
+<md-title>How to program a computer</md-title>
+<md-author>Jack Collins</md-author><location id="localhost:9999/db2" name="db2">
+<md-title>How to program a computer</md-title>
+<md-author>Jack Collins</md-author></location>
+<location id="localhost:9999/db2" name="db2">
+<md-title>How to program a computer</md-title>
+<md-author>Jack Collins</md-author></location>
+<count>2</count>
+<relevance>240000</relevance>
+<recid>title how to program a computer author jack collins</recid>
+</hit>
+</show>
diff --git a/test/test_facets_24.res b/test/test_facets_24.res
new file mode 100644 (file)
index 0000000..fa09272
--- /dev/null
@@ -0,0 +1,44 @@
+<termlist>
+<activeclients>0</activeclients>
+<list name="xtargets">
+<term>
+<id>z3950.indexdata.com/marc</id>
+<name>Index Data MARC test server</name>
+<frequency>10</frequency>
+<state>Client_Idle</state>
+<diagnostic>0</diagnostic>
+</term>
+<term>
+<id>localhost:9999/db2</id>
+<name>db2</name>
+<frequency>2</frequency>
+<state>Client_Idle</state>
+<diagnostic>0</diagnostic>
+</term>
+</list>
+<list name="author">
+<term><name>Jack Collins</name><frequency>4</frequency></term>
+<term><name>Mairs, John W</name><frequency>1</frequency></term>
+<term><name>Wood, Helen M</name><frequency>1</frequency></term>
+<term><name>Englund, Carl R</name><frequency>1</frequency></term>
+</list>
+<list name="subject">
+<term><name>Community colleges</name><frequency>1</frequency></term>
+<term><name>Scintillation cameras</name><frequency>1</frequency></term>
+<term><name>Imaging systems in medicine</name><frequency>1</frequency></term>
+<term><name>Cartography</name><frequency>1</frequency></term>
+<term><name>Tomography</name><frequency>1</frequency></term>
+<term><name>Optical pattern recognition</name><frequency>1</frequency></term>
+<term><name>Computers</name><frequency>1</frequency></term>
+<term><name>Railroads</name><frequency>1</frequency></term>
+<term><name>Universities and colleges</name><frequency>1</frequency></term>
+<term><name>Radioisotope scanning</name><frequency>1</frequency></term>
+</list>
+<list name="date">
+<term><name>1977</name><frequency>3</frequency></term>
+<term><name>1974</name><frequency>2</frequency></term>
+<term><name>1971</name><frequency>2</frequency></term>
+<term><name>1980</name><frequency>1</frequency></term>
+<term><name>1973</name><frequency>1</frequency></term>
+</list>
+</termlist>
index 06911f7..79cdffc 100644 (file)
@@ -17,3 +17,8 @@ http://localhost:9763/search.pz2?session=1&command=show
 http://localhost:9763/search.pz2?session=1&command=termlist&name=xtargets%2Cauthor%2Csubject%2Cdate
 10 http://localhost:9763/search.pz2?session=1&command=termlist&name=xtargets%2Cauthor%2Csubject%2Cdate
 http://localhost:9763/search.pz2?session=1&command=bytarget
+http://localhost:9763/search.pz2?command=init
+http://localhost:9763/search.pz2?session=2&command=settings&pz:name%5Blocalhost:9999%2Fdb2%5D=db2&pz:requestsyntax%5Blocalhost:9999%2Fdb2%5D=usmarc&pz:nativesyntax%5Blocalhost:9999%2Fdb2%5D=txml&pz:xslt%5Blocalhost:9999%2Fdb2%5D=tmarc.xsl
+http://localhost:9763/search.pz2?session=2&command=search&query=computer
+http://localhost:9763/search.pz2?session=2&command=show&block=1
+http://localhost:9763/search.pz2?session=2&command=termlist&name=xtargets%2Cauthor%2Csubject%2Cdate