From 422279f19e20343e71a46c5505696b2efa455b60 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 22 Aug 2006 08:11:32 +0000 Subject: [PATCH] Test indexing of leader + range operator. --- test/marcxml/record.abs | 3 ++- test/marcxml/t1.c | 5 ++++- test/marcxml/t2.c | 5 ++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/test/marcxml/record.abs b/test/marcxml/record.abs index e535c6a..9d1429d 100644 --- a/test/marcxml/record.abs +++ b/test/marcxml/record.abs @@ -1,4 +1,4 @@ -# $Id: record.abs,v 1.7 2006-03-23 09:13:47 adam Exp $ +# $Id: record.abs,v 1.8 2006-08-22 08:11:32 adam Exp $ name marcxml attset bib1.att @@ -10,6 +10,7 @@ marc usmarc.mar xpath disable +xelm /record/leader leader:w:range(data,0,5),leader2:w:range(data,5,3) xelm /record/controlfield[@tag="001"] Identifier-Standard:w xelm /record/controlfield[@tag="008"] Code-Language:w xelm /record/datafield[@tag="100"]/subfield[@code="a"] author:w,author:s diff --git a/test/marcxml/t1.c b/test/marcxml/t1.c index 484333b..4b4958e 100644 --- a/test/marcxml/t1.c +++ b/test/marcxml/t1.c @@ -1,4 +1,4 @@ -/* $Id: t1.c,v 1.9 2006-08-14 10:40:27 adam Exp $ +/* $Id: t1.c,v 1.10 2006-08-22 08:11:32 adam Exp $ Copyright (C) 1995-2006 Index Data ApS @@ -47,6 +47,9 @@ static void tst(int argc, char **argv) "@attr 1=54 eng " "@and @attr 1=1003 jack @attr 1=4 computer", 2)); + YAZ_CHECK(tl_query(zh, "@attr 1=leader 00366", 2)); + YAZ_CHECK(tl_query(zh, "@attr 1=leader2 nam", 2)); + YAZ_CHECK(tl_close_down(zh, zs)); } diff --git a/test/marcxml/t2.c b/test/marcxml/t2.c index a89c0ee..e0f140e 100644 --- a/test/marcxml/t2.c +++ b/test/marcxml/t2.c @@ -1,4 +1,4 @@ -/* $Id: t2.c,v 1.8 2006-08-14 10:40:27 adam Exp $ +/* $Id: t2.c,v 1.9 2006-08-22 08:11:32 adam Exp $ Copyright (C) 1995-2006 Index Data ApS @@ -43,6 +43,9 @@ static void tst(int argc, char **argv) YAZ_CHECK(tl_query(zh, "@and @attr 1=1003 jack @attr 1=4 computer", 2)); + YAZ_CHECK(tl_query(zh, "@attr 1=leader 00366", 2)); + YAZ_CHECK(tl_query(zh, "@attr 1=leader2 nam", 12)); + YAZ_CHECK(tl_close_down(zh, zs)); } -- 1.7.10.4