X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fapi%2Ft8.c;h=31e17ac5a4e911d13e4025b6bc987bb782ab0244;hb=4717561b3bc0bcd508b5d017079bd99b3a27dd84;hp=e1aa6cafaa780286402a1701b801e3aecfaa1b3d;hpb=6ba9698e88c0283e40fa5980a1a6b551fff2d597;p=idzebra-moved-to-github.git diff --git a/test/api/t8.c b/test/api/t8.c index e1aa6ca..31e17ac 100644 --- a/test/api/t8.c +++ b/test/api/t8.c @@ -1,8 +1,5 @@ -/* $Id: t8.c,v 1.11 2006-05-19 13:49:35 adam Exp $ - Copyright (C) 1995-2005 - 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 @@ -15,9 +12,9 @@ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Zebra; see the file LICENSE.zebra. If not, write to the -Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ /** t8: test numeric attributes */ @@ -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));