X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fapi%2Ft11.c;h=490af8837d17ffe4be27902a9b10c4ce5015ab9b;hb=1d76eefd3435e9a3fb330fd2ae3317b401183915;hp=1f27186e05a6ad892ce8c518eb7956c18070e7cf;hpb=ecb3935e78cd9bcfdebafdee0834cfb1060d7b5e;p=idzebra-moved-to-github.git diff --git a/test/api/t11.c b/test/api/t11.c index 1f27186..490af88 100644 --- a/test/api/t11.c +++ b/test/api/t11.c @@ -1,5 +1,5 @@ -/* $Id: t11.c,v 1.5 2006-05-10 08:13:35 adam Exp $ - Copyright (C) 1995-2005 +/* $Id: t11.c,v 1.8 2006-09-15 10:44:34 adam Exp $ + Copyright (C) 1995-2006 Index Data ApS This file is part of the Zebra server. @@ -15,9 +15,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 + */ /** testing of scan */ @@ -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)); }