X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fapi%2Ftest_scan.c;h=33b2ab2afe0026de6b51e73d7b16ce702a8fa508;hb=5403eea61e14f91b1863c151cfa0f60561ca95ec;hp=a30c833db9aae9634e089f52e5e9208d6e4fcac4;hpb=ac13dceecd5f75669820819575daf88e0add5c8d;p=idzebra-moved-to-github.git
diff --git a/test/api/test_scan.c b/test/api/test_scan.c
index a30c833..33b2ab2 100644
--- a/test/api/test_scan.c
+++ b/test/api/test_scan.c
@@ -1,5 +1,5 @@
/* This file is part of the Zebra server.
- Copyright (C) 1994-2011 Index Data
+ Copyright (C) Index Data
Zebra is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
@@ -28,7 +28,7 @@ const char *myrec[] = {
"\nc d\n\n",
"\ne f\n\n" ,
0} ;
-
+
static void tst(int argc, char **argv)
{
ZebraService zs = tl_start_up(0, argc, argv);
@@ -136,12 +136,33 @@ static void tst(int argc, char **argv)
YAZ_CHECK(tl_scan(zh, "@attr 1=4 0", 10, 100, 1, 6, 1, ent));
}
+
{
- const char *ent[] = { "a", "b", "c", "d", "e", "f", 0 };
+ const char *ent[] = { 0 };
YAZ_CHECK(tl_scan(zh, "@attr 1=4 0", 22, 10, 1, 0, 1, ent));
}
{
+ const char *ent[] = { "a", "b", "c", "d", 0 };
+ YAZ_CHECK(tl_scan(zh, "@attr 1=4 f", 6, 4, 6, 4, 0, ent));
+ }
+
+ {
+ const char *ent[] = { "a", "b", "c", "d", "e", 0 };
+ YAZ_CHECK(tl_scan(zh, "@attr 1=4 f", 6, 5, 6, 5, 0, ent));
+ }
+
+ {
+ const char *ent[] = { "a", "b", 0 };
+ YAZ_CHECK(tl_scan(zh, "@attr 1=4 c", 6, 5, 3, 2, 1, ent));
+ }
+
+ {
+ const char *ent[] = { "c", "d", "e", "f", 0 };
+ YAZ_CHECK(tl_scan(zh, "@attr 1=4 c", 1, 6, 1, 4, 1, ent));
+ }
+
+ {
const char *ent[] = { 0 };
YAZ_CHECK(tl_scan(zh, "@attr 1=4 z", -22, 10, -22, 0, 1, ent));
}