ccl2rpn: more characters to escape (regexp-1).
[yaz-moved-to-github.git] / test / test_ccl.c
index 72370e3..76d76ba 100644 (file)
@@ -260,12 +260,24 @@ void tst1(int pass)
     YAZ_CHECK(tst_ccl_query(bibset, "title=.", 
                             "@attr 5=102 @attr 1=/my/title \\\\. "));
 
-    YAZ_CHECK(tst_ccl_query(bibset, "title=\\.", 
+    YAZ_CHECK(tst_ccl_query(bibset, "title=.", 
                             "@attr 5=102 @attr 1=/my/title \\\\. "));
 
     YAZ_CHECK(tst_ccl_query(bibset, "title=\".\"", 
                             "@attr 5=102 @attr 1=/my/title \\\\. "));
 
+    YAZ_CHECK(tst_ccl_query(bibset, "title=?\\?", 
+                            "@attr 5=102 @attr 1=/my/title .*\\\\? "));
+
+    YAZ_CHECK(tst_ccl_query(bibset, "title=\"?\\?\"", 
+                            "@attr 5=102 @attr 1=/my/title \\\\?\\\\? "));
+
+    YAZ_CHECK(tst_ccl_query(bibset, "title=\\\\", 
+                            "@attr 5=102 @attr 1=/my/title \\\\\\\\ "));
+
+    YAZ_CHECK(tst_ccl_query(bibset, "\\\\", 
+                            "@attr 4=2 @attr 1=1016 \\\\ "));
+
     YAZ_CHECK(tst_ccl_query(bibset, "comb=a", 
                             "@or @attr 4=2 @attr 1=1016 a "
                             "@attr 1=/my/title a "));