X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=test%2Fapi%2Ft5.c;h=9199b738973a2162b66884e1f95877cd56b11181;hp=8f568786461bdbc4885f64e40bdfffbda33e9dfc;hb=3f837255e2e97bd39ffabb13621d398f5610348c;hpb=763bf5f4fc8d22feda4784ec7a9db01902902016 diff --git a/test/api/t5.c b/test/api/t5.c index 8f56878..9199b73 100644 --- a/test/api/t5.c +++ b/test/api/t5.c @@ -1,4 +1,4 @@ -/* $Id: t5.c,v 1.22 2007-05-14 13:21:32 adam Exp $ +/* $Id: t5.c,v 1.23 2007-05-25 12:17:11 adam Exp $ Copyright (C) 1995-2007 Index Data ApS @@ -189,6 +189,18 @@ static void tst(int argc, char **argv) /* exl=1 distance=2 order=0 relation=3 (=), known, unit=word */ YAZ_CHECK(tl_query(zh, "@attr 1=4 @prox 1 2 1 3 k 2 my x", 1)); + /* Non-indexed numeric use, but specified in bib1.att (bug #1142) */ + YAZ_CHECK(tl_query_x(zh, "@attr 1=1000 x", 0, 114)); + YAZ_CHECK(tl_query_x(zh, "@attr 1=1000 @attr 14=0 x", 0, 114)); + YAZ_CHECK(tl_query_x(zh, "@attr 1=1000 @attr 14=1 x", 0, 0)); + /* Non-indexed numeric use and unspecified in bib1.att */ + YAZ_CHECK(tl_query_x(zh, "@attr 1=999 x", 0, 114)); + YAZ_CHECK(tl_query_x(zh, "@attr 1=999 @attr 14=1 x", 0, 114)); + /* Non-indexed string use attribute */ + YAZ_CHECK(tl_query_x(zh, "@attr 1=gyf x", 0, 114)); + YAZ_CHECK(tl_query_x(zh, "@attr 1=gyf @attr 14=0 x", 0, 114)); + YAZ_CHECK(tl_query_x(zh, "@attr 1=gyf @attr 14=1 x", 0, 0)); + /* provoke unsupported use attribute */ YAZ_CHECK(tl_query_x(zh, "@attr 1=999 @attr 4=1 x", 0, 114)); YAZ_CHECK(tl_query_x(zh, "@attr 1=999 @attr 4=6 x", 0, 114));