Added CQL free-form term tests.
authorAdam Dickmeiss <adam@indexdata.dk>
Sun, 6 Jan 2008 17:37:13 +0000 (17:37 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Sun, 6 Jan 2008 17:37:13 +0000 (17:37 +0000)
19 files changed:
test/cql/11.1.err [new file with mode: 0644]
test/cql/11.1.out [new file with mode: 0644]
test/cql/11.2.err [new file with mode: 0644]
test/cql/11.2.out [new file with mode: 0644]
test/cql/11.3.err [new file with mode: 0644]
test/cql/11.3.out [new file with mode: 0644]
test/cql/11.4.err [new file with mode: 0644]
test/cql/11.4.out [new file with mode: 0644]
test/cql/11.5.err [new file with mode: 0644]
test/cql/11.5.out [new file with mode: 0644]
test/cql/11.6.err [new file with mode: 0644]
test/cql/11.6.out [new file with mode: 0644]
test/cql/11.7.err [new file with mode: 0644]
test/cql/11.7.out [new file with mode: 0644]
test/cql/12.1.err [new file with mode: 0644]
test/cql/12.1.out [new file with mode: 0644]
test/cql/12.2.err [new file with mode: 0644]
test/cql/12.2.out [new file with mode: 0644]
test/cqlsample

diff --git a/test/cql/11.1.err b/test/cql/11.1.err
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/cql/11.1.out b/test/cql/11.1.out
new file mode 100644 (file)
index 0000000..a8ff186
--- /dev/null
@@ -0,0 +1,8 @@
+<searchClause>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>a</term>
+  <term>b</term>
+</searchClause>
diff --git a/test/cql/11.2.err b/test/cql/11.2.err
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/cql/11.2.out b/test/cql/11.2.out
new file mode 100644 (file)
index 0000000..58fd9bd
--- /dev/null
@@ -0,0 +1,9 @@
+<searchClause>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>a</term>
+  <term>c</term>
+  <term>b</term>
+</searchClause>
diff --git a/test/cql/11.3.err b/test/cql/11.3.err
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/cql/11.3.out b/test/cql/11.3.out
new file mode 100644 (file)
index 0000000..3a66149
--- /dev/null
@@ -0,0 +1,8 @@
+<searchClause>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>a.b</term>
+  <term>c</term>
+</searchClause>
diff --git a/test/cql/11.4.err b/test/cql/11.4.err
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/cql/11.4.out b/test/cql/11.4.out
new file mode 100644 (file)
index 0000000..37dbf3f
--- /dev/null
@@ -0,0 +1,9 @@
+<searchClause>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>and</term>
+  <term>c</term>
+  <term>b</term>
+</searchClause>
diff --git a/test/cql/11.5.err b/test/cql/11.5.err
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/cql/11.5.out b/test/cql/11.5.out
new file mode 100644 (file)
index 0000000..50f2571
--- /dev/null
@@ -0,0 +1,8 @@
+<searchClause>
+  <index>cql.serverChoice</index>
+  <relation>
+    <value>=</value>
+  </relation>
+  <term>all</term>
+  <term>a</term>
+</searchClause>
diff --git a/test/cql/11.6.err b/test/cql/11.6.err
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/cql/11.6.out b/test/cql/11.6.out
new file mode 100644 (file)
index 0000000..42e46f9
--- /dev/null
@@ -0,0 +1,7 @@
+<searchClause>
+  <index>a</index>
+  <relation>
+    <value>any</value>
+  </relation>
+  <term>b</term>
+</searchClause>
diff --git a/test/cql/11.7.err b/test/cql/11.7.err
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/cql/11.7.out b/test/cql/11.7.out
new file mode 100644 (file)
index 0000000..6073292
--- /dev/null
@@ -0,0 +1,26 @@
+<triple>
+  <boolean>
+    <value>and</value>
+  </boolean>
+  <leftOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>dc.title</term>
+      <term>c</term>
+      <term>b</term>
+      <term>a</term>
+    </searchClause>
+  </leftOperand>
+  <rightOperand>
+    <searchClause>
+      <index>cql.serverChoice</index>
+      <relation>
+        <value>=</value>
+      </relation>
+      <term>d</term>
+    </searchClause>
+  </rightOperand>
+</triple>
diff --git a/test/cql/12.1.err b/test/cql/12.1.err
new file mode 100644 (file)
index 0000000..f83d884
--- /dev/null
@@ -0,0 +1 @@
+Syntax error
diff --git a/test/cql/12.1.out b/test/cql/12.1.out
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/cql/12.2.err b/test/cql/12.2.err
new file mode 100644 (file)
index 0000000..f83d884
--- /dev/null
@@ -0,0 +1 @@
+Syntax error
diff --git a/test/cql/12.2.out b/test/cql/12.2.out
new file mode 100644 (file)
index 0000000..e69de29
index f08ff47..5b5b469 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: cqlsample,v 1.3 2008-01-06 13:08:09 adam Exp $
+# $Id: cqlsample,v 1.4 2008-01-06 17:37:13 adam Exp $
 # CQL queries for testing.
 # from http://www.loc.gov/z3950/agency/zing/cql/sample-queries.html
 # Simple Term
@@ -101,4 +101,15 @@ missingParen any fish)
 title = ("illegal parentheses")
 > illegal="urn:missingQuery" 
 
-
+# free-form term OK)
+a b
+a b c
+a.b c
+and b c
+all a
+a any b
+dc.title a b c and d
+
+# free-form term (Syntax error)
+a b.c
+a and