X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Ftstccl.c;h=dada1e04a6a058f4a3a9c168e8af12d6d251b736;hb=055f23ee3692349a03f681ef1a0d5fd70c0cc770;hp=6455d70ccf01618646275fc73bea0527c2c3b092;hpb=ae1c6f1a0a5fb745b1a5fa315869161d7480c6f7;p=yaz-moved-to-github.git
diff --git a/test/tstccl.c b/test/tstccl.c
index 6455d70..dada1e0 100644
--- a/test/tstccl.c
+++ b/test/tstccl.c
@@ -1,5 +1,5 @@
/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2009 Index Data
+ * Copyright (C) 1995-2010 Index Data
* See the file LICENSE for details.
*/
@@ -74,6 +74,8 @@ void tst1(int pass)
ccl_qual_fitem(bibset, "1=/my/title", "dc.title");
ccl_qual_fitem(bibset, "r=r", "date");
ccl_qual_fitem(bibset, "r=o", "x");
+ ccl_qual_fitem(bibset, "dc.title", "title");
+ ccl_qual_fitem(bibset, "term dc.title", "comb");
break;
case 1:
strcpy(tstline, "ti u=4 s=pw t=l,r");
@@ -90,6 +92,12 @@ void tst1(int pass)
strcpy(tstline, "x r=o # ordered relation");
ccl_qual_line(bibset, tstline);
+
+ strcpy(tstline, "title dc.title # alias");
+ ccl_qual_line(bibset, tstline);
+
+ strcpy(tstline, "comb term dc.title # combination");
+ ccl_qual_line(bibset, tstline);
break;
case 2:
ccl_qual_buf(bibset, "ti u=4 s=pw t=l,r\n"
@@ -98,6 +106,8 @@ void tst1(int pass)
"dc.title 1=/my/title\n"
"date r=r\n"
"x r=o\n"
+ "title dc.title\n"
+ "comb term dc.title\n"
);
break;
case 3:
@@ -128,6 +138,13 @@ void tst1(int pass)
" \n"
" \n"
" \n"
+ " \n"
+ " \n"
+ " \n"
+ " \n"
+ " \n"
+ " \n"
+ " \n"
"\n";
doc = xmlParseMemory(xml_str, strlen(xml_str));
@@ -217,6 +234,13 @@ void tst1(int pass)
"@and @attr 4=2 @attr 1=1016 a "
"@attr 5=1 @attr 4=2 @attr 1=1016 b "));
+ YAZ_CHECK(tst_ccl_query(bibset, "title=a",
+ "@attr 1=/my/title a "));
+
+ YAZ_CHECK(tst_ccl_query(bibset, "comb=a",
+ "@or @attr 4=2 @attr 1=1016 a "
+ "@attr 1=/my/title a "));
+
/* Bug #2895 */
#if 1
YAZ_CHECK(tst_ccl_query(bibset, "a? b?",