CCL fixes: bug 2895 and bug 3539
authorAdam Dickmeiss <adam@indexdata.dk>
Fri, 9 Jul 2010 14:31:57 +0000 (16:31 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Fri, 9 Jul 2010 14:31:57 +0000 (16:31 +0200)
src/ccltoken.c
test/test_ccl.c

index ed45762..b784295 100644 (file)
@@ -198,6 +198,7 @@ struct ccl_token *ccl_token_add(struct ccl_token *at)
         n->next->prev = n;
 
     n->kind = CCL_TOK_TERM;
         n->next->prev = n;
 
     n->kind = CCL_TOK_TERM;
+    n->left_trunc = n->right_trunc = 0;
     n->name = 0;
     n->len = 0;
     n->ws_prefix_buf = 0;
     n->name = 0;
     n->len = 0;
     n->ws_prefix_buf = 0;
index dada1e0..9ebebad 100644 (file)
@@ -241,18 +241,10 @@ void tst1(int pass)
                             "@or @attr 4=2 @attr 1=1016 a "
                             "@attr 1=/my/title 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?", 
-                            /* incorrect. */
-                            "@and @attr 4=2 @attr 1=1016 a? "
-                            "@attr 5=1 @attr 4=2 @attr 1=1016 b "));
-#else
     YAZ_CHECK(tst_ccl_query(bibset, "a? b?", 
                             /* correct */
                             "@and @attr 5=1 @attr 4=2 @attr 1=1016 a "
                             "@attr 5=1 @attr 4=2 @attr 1=1016 b "));
     YAZ_CHECK(tst_ccl_query(bibset, "a? b?", 
                             /* correct */
                             "@and @attr 5=1 @attr 4=2 @attr 1=1016 a "
                             "@attr 5=1 @attr 4=2 @attr 1=1016 b "));
-#endif
     ccl_qual_rm(&bibset);
 }
 
     ccl_qual_rm(&bibset);
 }