From: Adam Dickmeiss Date: Sat, 1 Apr 2006 11:47:41 +0000 (+0000) Subject: More PQF parser tests X-Git-Tag: YAZ.2.1.18~43 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=65e57b77a51d4b03e6ab7a41bcc11e8e8be62e83;hp=a7c0fe1d8d8d89204f5c25a72d556d3d67b32d35 More PQF parser tests --- diff --git a/test/tstpquery.c b/test/tstpquery.c index c36e65d..a3c0b25 100644 --- a/test/tstpquery.c +++ b/test/tstpquery.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: tstpquery.c,v 1.1 2006-04-01 11:45:23 adam Exp $ + * $Id: tstpquery.c,v 1.2 2006-04-01 11:47:41 adam Exp $ */ #include @@ -60,9 +60,13 @@ static void tst() YAZ_CHECK(expect_pqf("a", "@attrset Bib-1 a", YAZ_PQF_ERROR_NONE)); YAZ_CHECK(expect_pqf("@attr 1=4 a", "@attrset Bib-1 @attr 1=4 a", YAZ_PQF_ERROR_NONE)); YAZ_CHECK(expect_pqf("a b", "", YAZ_PQF_ERROR_EXTRA)); + YAZ_CHECK(expect_pqf("@and a", "", YAZ_PQF_ERROR_MISSING)); + YAZ_CHECK(expect_pqf("@attr p=q a", "", YAZ_PQF_ERROR_BAD_INTEGER)); YAZ_CHECK(expect_pqf("@prox 0 0 0 0 k 0 a b", "@attrset Bib-1 @prox 0 0 0 0 k 0 a b", YAZ_PQF_ERROR_NONE)); + YAZ_CHECK(expect_pqf("@prox 0 0 0 0 3 0 a b", "", + YAZ_PQF_ERROR_PROXIMITY)); } int main (int argc, char **argv)