Renamed files for sort tests.
[idzebra-moved-to-github.git] / test / api / t8.c
index d1edd0e..31e17ac 100644 (file)
@@ -1,8 +1,5 @@
-/* $Id: t8.c,v 1.12 2006-08-14 10:40:22 adam Exp $
-   Copyright (C) 1995-2006
-   Index Data ApS
-
-This file is part of the Zebra server.
+/* This file is part of the Zebra server.
+   Copyright (C) 1995-2008 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
@@ -69,9 +66,24 @@ static void tst(int argc, char **argv)
     /* 4=109: numeric string */
     /* 2=3: equal  2=1: less, 2=4: greater or equal 2=5 greater */
 
-    /* N>25, search attributes work */
+    /* N>=25, search attributes work */
     YAZ_CHECK(tl_query(zh,  "@attr 2=4 @attr gils 1=2040 @attr 4=109 25", 2));
 
+    /* N>49, search attributes work */
+    YAZ_CHECK(tl_query(zh,  "@attr 2=5 @attr gils 1=2040 @attr 4=109 49", 0));
+
+    /* N>=49, search attributes work */
+    YAZ_CHECK(tl_query(zh,  "@attr 2=4 @attr gils 1=2040 @attr 4=109 49", 2));
+
+    /* N>48, search attributes work */
+    YAZ_CHECK(tl_query(zh,  "@attr 2=5 @attr gils 1=2040 @attr 4=109 48", 2));
+
+    /* N<48, search attributes work */
+    YAZ_CHECK(tl_query(zh,  "@attr 2=1 @attr gils 1=2040 @attr 4=109 48", 1));
+
+    /* N<=48, search attributes work */
+    YAZ_CHECK(tl_query(zh,  "@attr 2=2 @attr gils 1=2040 @attr 4=109 48", 1));
+
     /* N=41, get rec1 only */
     YAZ_CHECK(tl_query(zh,  "@attr 2=3 @attr gils 1=2040 @attr 4=109 41", 1));