X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fapi%2Ft11.c;h=c44a802e7a5ffd78cdbdaf27770f5ee17df365c3;hb=9dbf16ff99472e07182dab1c7cf8796a4d357b0c;hp=79660e103097138721afaa3cae712a0943c9140f;hpb=4478d785b7769691261005c98063b98a5a5971b3;p=idzebra-moved-to-github.git diff --git a/test/api/t11.c b/test/api/t11.c index 79660e1..c44a802 100644 --- a/test/api/t11.c +++ b/test/api/t11.c @@ -1,5 +1,5 @@ -/* $Id: t11.c,v 1.6 2006-08-14 10:40:22 adam Exp $ - Copyright (C) 1995-2006 +/* $Id: t11.c,v 1.9 2007-01-15 15:10:20 adam Exp $ + Copyright (C) 1995-2007 Index Data ApS This file is part of the Zebra server. @@ -38,6 +38,26 @@ static void tst(int argc, char **argv) YAZ_CHECK(tl_init_data(zh, myrec)); + /* + int tl_scan + ( + ZebraHandle zh, const char *query, + int pos, int num, + int exp_pos, int exp_num, int exp_partial, + const char **exp_entries + ) + */ + + if (1) + { + /* bad string use attrite, bug #647 */ + YAZ_CHECK(tl_scan(zh, "@attr 1=bad 0", 1, 1, 1, 1, 0, 0)); + } + if (1) + { + /* bad numeric use attributes, bug #647 */ + YAZ_CHECK(tl_scan(zh, "@attr 1=1234 0", 1, 1, 1, 1, 0, 0)); + } if (1) { /* scan before. nothing must be returned */ @@ -47,7 +67,8 @@ static void tst(int argc, char **argv) if (1) { /* scan after. nothing must be returned */ - YAZ_CHECK(tl_scan(zh, "@attr 1=4 m", 1, 1, 1, 0, 1, 0)); + const char *ent[] = { 0 }; + YAZ_CHECK(tl_scan(zh, "@attr 1=4 m", 1, 1, 1, 0, 1, ent)); } if (1) { @@ -121,7 +142,8 @@ static void tst(int argc, char **argv) } if (1) { - YAZ_CHECK(tl_scan(zh, "@attr 1=4 z", -22, 10, -22, 0, 1, 0)); + const char *ent[] = { 0 }; + YAZ_CHECK(tl_scan(zh, "@attr 1=4 z", -22, 10, -22, 0, 1, ent)); } YAZ_CHECK(tl_close_down(zh, zs)); }