Add check for CCL syntax error + expected results
authorAdam Dickmeiss <adam@indexdata.dk>
Sun, 8 Aug 2010 19:22:28 +0000 (21:22 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Sun, 8 Aug 2010 19:22:28 +0000 (21:22 +0200)
test_http_urls includes check for CCL syntax error as well as zero
hits. test_http_52..test_http_57.res are expected results.

test/test_http_52.res [new file with mode: 0644]
test/test_http_53.res [new file with mode: 0644]
test/test_http_54.res [new file with mode: 0644]
test/test_http_55.res [new file with mode: 0644]
test/test_http_56.res [new file with mode: 0644]
test/test_http_57.res [new file with mode: 0644]
test/test_http_urls

diff --git a/test/test_http_52.res b/test/test_http_52.res
new file mode 100644 (file)
index 0000000..1dc284e
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<init><status>OK</status><session>8</session><protocol>1</protocol></init>
\ No newline at end of file
diff --git a/test/test_http_53.res b/test/test_http_53.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_http_54.res b/test/test_http_54.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_http_55.res b/test/test_http_55.res
new file mode 100644 (file)
index 0000000..d3b889f
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<show>
+<status>OK</status>
+<activeclients>0</activeclients>
+<merged>0</merged>
+<total>0</total>
+<start>0</start>
+<num>0</num>
+</show>
diff --git a/test/test_http_56.res b/test/test_http_56.res
new file mode 100644 (file)
index 0000000..e2db1ca
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<error code="3" msg="Malformed parameter value">query</error>
\ No newline at end of file
diff --git a/test/test_http_57.res b/test/test_http_57.res
new file mode 100644 (file)
index 0000000..d3b889f
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<show>
+<status>OK</status>
+<activeclients>0</activeclients>
+<merged>0</merged>
+<total>0</total>
+<start>0</start>
+<num>0</num>
+</show>
index 1862126..1f68455 100644 (file)
@@ -51,5 +51,7 @@ http://localhost:9763/search.pz2?session=7&command=search&query=greece
 http://localhost:9763/search.pz2?session=6&command=record&id=title+computer+processing+of+dynamic+images+from+an+anger+scintillation+camera+author+medium+book&offset=0
 http://localhost:9763/search.pz2?command=init
 http://localhost:9763/search.pz2?session=8&command=settings&pz:name%5Bz3950.indexdata.com%2Fmarc%5D=marc&pz:requestsyntax%5Bz3950.indexdata.com%2Fmarc%5D=usmarc&pz:nativesyntax%5Bz3950.indexdata.com%2Fmarc%5D=iso2709&pz:xslt%5Bz3950.indexdata.com%2Fmarc%5D=marc21%5Ftest.xsl&pz:recordfilter%5Bz3950.indexdata.com%2Fmarc%5D=date
-http://localhost:9763/search.pz2?session=3&command=search&query=xyzzyz
-1 http://localhost:9763/search.pz2?session=6&command=show&block=1
\ No newline at end of file
+http://localhost:9763/search.pz2?session=8&command=search&query=xyzzyz
+2 http://localhost:9763/search.pz2?session=8&command=show&block=1
+http://localhost:9763/search.pz2?session=8&command=search&query=a+and
+1 http://localhost:9763/search.pz2?session=8&command=show&block=1