X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fxslt%2Fxslt3.c;h=7bab9e8e94404c7fb58bca64852e6437571f84fd;hb=342c28e71fe5122d17d760a930107cab0266e9c6;hp=0fb67c809d1e4fb7751bfebfae1d84c4c49c7770;hpb=aa9c7bcd6f5ec5a2523c40f929ebdc9d72c1b48a;p=idzebra-moved-to-github.git diff --git a/test/xslt/xslt3.c b/test/xslt/xslt3.c index 0fb67c8..7bab9e8 100644 --- a/test/xslt/xslt3.c +++ b/test/xslt/xslt3.c @@ -1,4 +1,4 @@ -/* $Id: xslt3.c,v 1.1 2005-05-01 07:17:47 adam Exp $ +/* $Id: xslt3.c,v 1.3 2005-08-18 12:50:20 adam Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -42,7 +42,7 @@ int main(int argc, char **argv) zebra_init(zh); - zebra_set_resource(zh, "recordType", "xslt.marc1.xsl"); + zebra_set_resource(zh, "recordType", "xslt.marcschema-one.xml"); sprintf(path, "%.200s/marc-one.xml", get_srcdir()); f = fopen(path, "rb"); @@ -61,14 +61,25 @@ int main(int argc, char **argv) record_buf[r] = '\0'; - /* for now only the first of the records in the collection is - indexed. That can be seen as a bug */ + /* index this one record */ init_data(zh, records_array); /* only get hits from first record .. */ do_query(__LINE__, zh, "@attr 1=title computer", 1); do_query(__LINE__, zh, "@attr 1=control 11224466", 1); do_query_x(__LINE__, zh, "@attr 1=titl computer", 0, 121); + + + /* index one more time to see that we don't get dups, since + index.xsl has a record ID associated with them */ + zebra_add_record(zh, record_buf, strlen(record_buf)); + + /* only get hits from first record .. */ + do_query(__LINE__, zh, "@attr 1=title computer", 1); + do_query(__LINE__, zh, "@attr 1=control 11224466", 1); + do_query_x(__LINE__, zh, "@attr 1=titl computer", 0, 121); + + return close_down(zh, zs, 0); }