dnl Zebra, Index Data Aps, 1995-2003
-dnl $Id: configure.in,v 1.77 2003-04-24 20:10:24 adam Exp $
+dnl $Id: configure.in,v 1.78 2003-05-21 14:39:21 adam Exp $
dnl
AC_INIT(include/zebraver.h)
AM_INIT_AUTOMAKE(idzebra,1.3.11)
dnl
AC_ARG_ENABLE(threads, [ --disable-threads disable threads],[enable_threads=$enableval],[enable_threads=yes])
if test "$enable_threads" = "yes"; then
+ AM_CONDITIONAL(ISTHR,true)
yazflag=threads
else
+ AM_CONDITIONAL(ISTHR,false)
yazflag=""
fi
YAZ_INIT($yazflag)
examples/Makefile examples/gils/Makefile examples/zthes/Makefile
idzebra.spec
])
-
if test -x "$perlbin"; then
- res=`cd perl ; $perlbin Makefile.PL ; cd .. ;`;
+ res=`cd perl ; $perlbin Makefile.PL ; cd .. ;`;
+fi
+if test -z "$YAZLIB"; then
+ echo "YAZ was not found. Use --with-yazconfig=DIR to specify location."
+ test -f /etc/debian_version && echo "Debian package libyaz-dev is required."
fi
+
-SUBDIRS=gils usmarc api dmoz xpath sort xelm cddb rusmarc
+SUBDIRS=api gils usmarc dmoz xpath sort xelm cddb rusmarc
-testclient_SOURCES = testclient.c
-
-noinst_PROGRAMS = testclient
-
-AM_CPPFLAGS = $(YAZINC)
-
-LDADD = $(YAZLIB)
-# $Id: Makefile.am,v 1.9 2003-05-20 13:52:41 adam Exp $
+# $Id: Makefile.am,v 1.10 2003-05-21 14:39:22 adam Exp $
TESTS = t1 t2 t3
+testclient_SOURCES = testclient.c
+
+noinst_PROGRAMS = testclient
+
EXTRA_PROGRAMS = t1 t2 t3
EXTRA_DIST=t1.cfg t2.cfg
--- /dev/null
+/*
+ * $Id: testclient.c,v 1.1 2003-05-21 14:39:22 adam Exp $
+ *
+ * Z39.50 client specifically for Zebra testing.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#ifdef WIN32
+#else
+#include <unistd.h>
+#endif
+
+#include <yaz/xmalloc.h>
+#include <yaz/options.h>
+#include <yaz/zoom.h>
+
+char *prog = "testclient";
+
+int main(int argc, char **argv)
+{
+ ZOOM_connection z;
+ ZOOM_resultset r;
+ int error;
+ const char *errmsg, *addinfo;
+ char *query = 0;
+ char *target = 0;
+ char *arg;
+ int delay_sec = 0;
+ int expected_hits=-1;
+ int ret;
+ int retrieve_number = 0;
+ int retrieve_offset = 0;
+ char *format = 0;
+ int pos;
+ int check_count = -1;
+ int exit_code = 0;
+
+ while ((ret = options("d:n:o:f:c:", argv, argc, &arg)) != -2)
+ {
+ switch (ret)
+ {
+ case 0:
+ if (!target)
+ target = xstrdup(arg);
+ else if (!query)
+ query = xstrdup(arg);
+ break;
+ case 'd':
+ delay_sec = atoi(arg);
+ break;
+ case 'n':
+ retrieve_number = atoi(arg);
+ break;
+ case 'o':
+ retrieve_offset = atoi(arg);
+ break;
+ case 'f':
+ format = xstrdup(arg);
+ break;
+ case 'c':
+ check_count = atoi(arg);
+ break;
+ default:
+ printf ("%s: unknown option %s\n", prog, arg);
+ printf ("usage:\n%s [options] target query \n", prog);
+ printf (" eg. indexdata.dk/gils computer\n");
+ exit (1);
+ }
+ }
+
+ if (!target || !target)
+ {
+ printf ("%s: missing target/query\n", prog);
+ printf ("usage:\n%s [options] target query \n", prog);
+ printf (" eg. bagel.indexdata.dk/gils computer\n");
+ printf ("Options:\n");
+ printf (" -n num number of records to fetch. Default: 0.\n");
+ printf (" -o off offset for records - counting from 0.\n");
+ printf (" -f format set record syntax. Default: none\n");
+ printf (" -d sec delay a number of seconds before exit.\n");
+ exit (3);
+ }
+ z = ZOOM_connection_new (target, 0);
+
+ if ((error = ZOOM_connection_error(z, &errmsg, &addinfo)))
+ {
+ printf ("Error: %s (%d) %s\n", errmsg, error, addinfo);
+ exit (2);
+ }
+
+ r = ZOOM_connection_search_pqf (z, query);
+ if ((error = ZOOM_connection_error(z, &errmsg, &addinfo)))
+ {
+ printf ("Error: %s (%d) %s\n", errmsg, error, addinfo);
+ if (check_count != -1)
+ exit_code = 10;
+ }
+ else
+ {
+ printf ("Result count: %d\n", ZOOM_resultset_size(r));
+ if (check_count != -1 && check_count != ZOOM_resultset_size(r))
+ {
+ printf("Wrong number of hits, expected %d, got %d\n",
+ expected_hits, ZOOM_resultset_size(r) );
+ exit(3);
+ }
+ }
+ if (format)
+ ZOOM_resultset_option_set(r, "preferredRecordSyntax", format);
+ for (pos = 0; pos < retrieve_number; pos++)
+ {
+ int len;
+ const char *rec =
+ ZOOM_record_get(
+ ZOOM_resultset_record(r, pos + retrieve_offset),
+ "render", &len);
+
+ if (rec)
+ fwrite (rec, 1, len, stdout);
+ }
+ if (delay_sec > 0)
+ sleep(delay_sec);
+ ZOOM_resultset_destroy (r);
+ ZOOM_connection_destroy (z);
+ exit (exit_code);
+}
+# $Id: Makefile.am,v 1.2 2003-05-21 14:39:22 adam Exp $
EXTRA_DIST = zebra.cfg cddb.abs cddb.flt cddb.tag b00b520d
+# $Id: Makefile.am,v 1.2 2003-05-21 14:39:22 adam Exp $
EXTRA_DIST = zebra-b.cfg zebra-c.cfg update.sh all.sh con1.pl con2.pl
-# $Id: Makefile.am,v 1.14 2003-05-20 13:52:41 adam Exp $
+# $Id: Makefile.am,v 1.15 2003-05-21 14:39:22 adam Exp $
dist-hook:
-mkdir $(distdir)/records
cp $(srcdir)/records/*.grs $(distdir)/records
-TESTS = stop01.sh stop02.sh stop03.sh stop04.sh \
- test1.sh test2.sh \
- timing1.sh timing2.sh
+# stop03.sh only works when Zebra is using threads.
+if ISTHR
+testscripts_thread = stop03.sh
+else
+testscripts_thread =
+endif
-EXTRA_DIST = $(TESTS) zebra1.cfg zebra2.cfg
+check_SCRIPTS = stop01.sh stop02.sh stop03.sh stop04.sh \
+ test1.sh test2.sh timing1.sh timing2.sh
+
+TESTS = stop01.sh stop02.sh $(testscripts_thread) stop04.sh \
+ test1.sh test2.sh timing1.sh timing2.sh
+
+EXTRA_DIST = zebra1.cfg zebra2.cfg $(check_SCRIPTS)
#!/bin/sh
-# $Id: stop01.sh,v 1.3 2003-05-06 20:09:28 adam Exp $
+# $Id: stop01.sh,v 1.4 2003-05-21 14:39:22 adam Exp $
# test start and stop of the server with -1
echo "initializing"
ps -p $PID |grep $PID >/dev/null || exit 1
echo " connecting to it..."
-../testclient localhost:9901 utah > log || exit 1
+../api/testclient localhost:9901 utah > log || exit 1
sleep 1
echo " checking that server does not run any more"
#!/bin/sh
-# $Id: stop02.sh,v 1.3 2003-05-06 20:09:28 adam Exp $
+# $Id: stop02.sh,v 1.4 2003-05-21 14:39:22 adam Exp $
# test start and stop of the server with -S
#
# FIXME - this test does not currently pass (H 22-oct-2002)
ps -p $PID |grep $PID >/dev/null || exit 1
echo " connecting to it..."
-../testclient localhost:9901 utah > log || exit 1
+../api/testclient localhost:9901 utah > log || exit 1
sleep 1
echo " checking that it still runs..."
ps -p $PID | grep $PID >/dev/null || exit 1
echo " connecting again, with a delay..."
-../testclient -d 5 localhost:9901 utah > log &
+../api/testclient -d 5 localhost:9901 utah > log &
sleep 1 # let the client connect
echo " killing it..."
#!/bin/sh
-# $Id: stop03.sh,v 1.3 2003-05-06 20:09:28 adam Exp $
+# $Id: stop03.sh,v 1.4 2003-05-21 14:39:22 adam Exp $
# test start and stop of the threaded server (-T)
#
# FIXME - this test does not currently pass (H 22-oct-2002)
ps -p $PID | grep $PID >/dev/null || exit 1
echo " connecting to it..."
-../testclient localhost:9901 utah > log || exit 1
+../api/testclient localhost:9901 utah > log || exit 1
sleep 1
echo " checking that it still runs..."
ps -p $PID >/dev/null || exit 1
echo " connecting again, with a delay..."
-../testclient localhost:9901 utah 5 > log &
+../api/testclient localhost:9901 utah 5 > log &
sleep 1 # let the client connect
echo " killing it..."
#!/bin/sh
-# $Id: stop04.sh,v 1.3 2003-05-06 20:09:28 adam Exp $
+# $Id: stop04.sh,v 1.4 2003-05-21 14:39:22 adam Exp $
# test start and stop of the forked server
#
ps -p $PID | grep $PID >/dev/null || exit 1
echo " connecting to it..."
-../testclient localhost:9901 utah > log || exit 1
+../api/testclient localhost:9901 utah > log || exit 1
sleep 1
echo " checking that it still runs..."
ps -p $PID | grep $PID >/dev/null || exit 1
echo " connecting again, with a delay..."
-../testclient localhost:9901 utah 5 > log &
+../api/testclient localhost:9901 utah 5 > log &
sleep 1 # let the client connect
echo " killing it..."
#!/bin/sh
-# $Id: test1.sh,v 1.5 2003-05-06 20:09:28 adam Exp $
+# $Id: test1.sh,v 1.6 2003-05-21 14:39:22 adam Exp $
echo "testing without stored keys (zebra1.cfg)"
sleep 1
test -f zebrasrv.pid || exit 1
echo "search 1..."
-../testclient localhost:9901 utah > log || exit 1
+../api/testclient localhost:9901 utah > log || exit 1
grep "^Result count: 17$" log || exit 1
echo "search 2..."
-../testclient localhost:9901 "@or utah the" > log || exit 1
+../api/testclient localhost:9901 "@or utah the" > log || exit 1
grep "^Result count: 40$" log || exit 1
echo "search 3..."
-../testclient localhost:9901 "@attr 1=4 the" > log || exit 1
+../api/testclient localhost:9901 "@attr 1=4 the" > log || exit 1
grep "^Result count: 1$" log || exit 1
echo "search 4..."
-../testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
+../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
grep "^Result count: 9$" log || exit 1
echo "reindexing..."
../../index/zebraidx -l idx.log -c zebra1.cfg update records || exit 1
echo "search 5..."
-../testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
+../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
grep "^Result count: 18$" log || exit 1
echo "stopping server..."
#!/bin/sh
-# $Id: test2.sh,v 1.5 2003-05-06 20:09:28 adam Exp $
+# $Id: test2.sh,v 1.6 2003-05-21 14:39:22 adam Exp $
echo "Testing with storekeys (zebra2.cfg)"
echo "init..."
rm -f idx.log log
test -f zebrasrv.pid || exit 1
echo "search 1..."
-../testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
+../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
grep "^Result count: 9$" log || exit 1
echo "update 3..."
../../index/zebraidx -l idx.log -c zebra2.cfg update records || exit 1
echo "search 2..."
-../testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
+../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
grep "^Result count: 9$" log || exit 1
echo "making test records..."
../../index/zebraidx -l idx.log -c zebra2.cfg update records || exit 1
echo "search 3..."
-../testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
+../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
grep "^Result count: 10$" log || exit 1
touch records/esdd0001.grs
../../index/zebraidx -l idx.log -c zebra2.cfg update records || exit 1
echo "search 4..."
-../testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
+../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
grep "^Result count: 10$" log || exit 1
echo "making another test record..."
../../index/zebraidx -l idx.log -c zebra2.cfg update records || exit 1
echo "search 5..."
-../testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
+../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
grep "^Result count: 10$" log || exit 1
sleep 1
sleep 1
echo "search 6..."
-../testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
+../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
grep "^Result count: 9$" log || exit 1
echo "search 7..."
-../testclient localhost:9901 "@attr 1=4 xyz" > log || exit 1
+../api/testclient localhost:9901 "@attr 1=4 xyz" > log || exit 1
grep "^Result count: 1$" log || exit 1
echo "stopping server..."
#!/bin/sh
-# $Id: timing1.sh,v 1.5 2003-05-06 20:09:28 adam Exp $
+# $Id: timing1.sh,v 1.6 2003-05-21 14:39:22 adam Exp $
# tests that updates are reflected immediately # in the registers.
# Repeatedly modifies a record and counts hits.
# Test 1: with good sleeps in every between - should pass always
sleep 2
echo " search 1..."
-../testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
+../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
grep "^Result count: 9$" log || exit 1
sleep 2
sleep 2
echo " search 2..."
-../testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
+../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
grep "^Result count: 10$" log || exit 1
sleep 2
sleep 2
echo " search 3..."
-../testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
+../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
echo " checking..."
grep "^Result count: 9$" log || exit 1
sleep 2
echo " search 4..."
-../testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
+../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
echo " checking..."
grep "^Result count: 10$" log || exit 1
sleep 2
echo " search 5..."
-../testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
+../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
echo " checking..."
grep "^Result count: 9$" log || exit 1
sleep 2
echo " search 6..."
-../testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
+../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
echo " checking..."
grep "^Result count: 10$" log || exit 1
sleep 2
echo " search 7..."
-../testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
+../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
echo " checking..."
grep "^Result count: 9$" log || exit 1
sleep 2
echo " search 8..."
-../testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
+../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
echo " checking..."
grep "^Result count: 10$" log || exit 1
#!/bin/sh
-# $Id: timing2.sh,v 1.5 2003-05-06 20:09:28 adam Exp $
+# $Id: timing2.sh,v 1.6 2003-05-21 14:39:22 adam Exp $
# Demonstrated that updates depend on file timestamps
echo "Testing timings of updates"
../../index/zebraidx -l idx.log -c zebra2.cfg update records || exit 1
echo " search 1..."
-../testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
+../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
grep "^Result count: 9$" log || exit 1
echo "making a test record..."
../../index/zebraidx -l idx.log -c zebra2.cfg update records || exit 1
echo " search 2..."
-../testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
+../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
grep "^Result count: 10$" log || exit 1
echo " modifying a test record (xyz)..."
../../index/zebraidx -l idx.log -c zebra2.cfg update records || exit 1
echo " search 3..."
-../testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
+../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
echo " checking..."
grep "^Result count: 10$" log || exit 1
../../index/zebraidx -l idx.log -c zebra2.cfg update records || exit 1
echo " search 4..."
-../testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
+../api/testclient localhost:9901 "@attr 1=4 utah" > log || exit 1
echo " checking..."
grep "^Result count: 9$" log || exit 1
-TESTS = test1.sh
+# $Id: Makefile.am,v 1.2 2003-05-21 14:39:22 adam Exp $
-EXTRA_DIST = $(TESTS) zebra.cfg rec1.xml rec2.xml rec3.xml zebra.cfg my.abs
+check_SCRIPTS = test1.sh
+
+TESTS = $(check_SCRIPTS)
+
+EXTRA_DIST = zebra.cfg rec1.xml rec2.xml rec3.xml zebra.cfg my.abs \
+ $(check_SCRIPTS)
#!/bin/sh
-# $Id: test1.sh,v 1.2 2003-05-06 17:39:01 adam Exp $
+# $Id: test1.sh,v 1.3 2003-05-21 14:39:22 adam Exp $
LOG=test1.log
rm -fr lock
mkdir lock
../../index/zebrasrv -l $LOG unix:socket &
sleep 1
test -f zebrasrv.pid || exit 2
-../testclient -n3 unix:socket '@or computer @attr 7=1 @attr 1=30 0' >tmp1
+../api/testclient -n3 unix:socket '@or computer @attr 7=1 @attr 1=30 0' >tmp1
echo 'Result count: 3
my:
title: third computer
+++ /dev/null
-/*
- * $Id: testclient.c,v 1.10 2003-02-28 15:34:21 adam Exp $
- *
- * Z39.50 client specifically for Zebra testing.
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-#ifdef WIN32
-#else
-#include <unistd.h>
-#endif
-
-#include <yaz/xmalloc.h>
-#include <yaz/options.h>
-#include <yaz/zoom.h>
-
-char *prog = "testclient";
-
-int main(int argc, char **argv)
-{
- ZOOM_connection z;
- ZOOM_resultset r;
- int error;
- const char *errmsg, *addinfo;
- char *query = 0;
- char *target = 0;
- char *arg;
- int delay_sec = 0;
- int expected_hits=-1;
- int ret;
- int retrieve_number = 0;
- int retrieve_offset = 0;
- char *format = 0;
- int pos;
- int check_count = -1;
- int exit_code = 0;
-
- while ((ret = options("d:n:o:f:c:", argv, argc, &arg)) != -2)
- {
- switch (ret)
- {
- case 0:
- if (!target)
- target = xstrdup(arg);
- else if (!query)
- query = xstrdup(arg);
- break;
- case 'd':
- delay_sec = atoi(arg);
- break;
- case 'n':
- retrieve_number = atoi(arg);
- break;
- case 'o':
- retrieve_offset = atoi(arg);
- break;
- case 'f':
- format = xstrdup(arg);
- break;
- case 'c':
- check_count = atoi(arg);
- break;
- default:
- printf ("%s: unknown option %s\n", prog, arg);
- printf ("usage:\n%s [options] target query \n", prog);
- printf (" eg. indexdata.dk/gils computer\n");
- exit (1);
- }
- }
-
- if (!target || !target)
- {
- printf ("%s: missing target/query\n", prog);
- printf ("usage:\n%s [options] target query \n", prog);
- printf (" eg. bagel.indexdata.dk/gils computer\n");
- printf ("Options:\n");
- printf (" -n num number of records to fetch. Default: 0.\n");
- printf (" -o off offset for records - counting from 0.\n");
- printf (" -f format set record syntax. Default: none\n");
- printf (" -d sec delay a number of seconds before exit.\n");
- exit (3);
- }
- z = ZOOM_connection_new (target, 0);
-
- if ((error = ZOOM_connection_error(z, &errmsg, &addinfo)))
- {
- printf ("Error: %s (%d) %s\n", errmsg, error, addinfo);
- exit (2);
- }
-
- r = ZOOM_connection_search_pqf (z, query);
- if ((error = ZOOM_connection_error(z, &errmsg, &addinfo)))
- {
- printf ("Error: %s (%d) %s\n", errmsg, error, addinfo);
- if (check_count != -1)
- exit_code = 10;
- }
- else
- {
- printf ("Result count: %d\n", ZOOM_resultset_size(r));
- if (check_count != -1 && check_count != ZOOM_resultset_size(r))
- {
- printf("Wrong number of hits, expected %d, got %d\n",
- expected_hits, ZOOM_resultset_size(r) );
- exit(3);
- }
- }
- if (format)
- ZOOM_resultset_option_set(r, "preferredRecordSyntax", format);
- for (pos = 0; pos < retrieve_number; pos++)
- {
- int len;
- const char *rec =
- ZOOM_record_get(
- ZOOM_resultset_record(r, pos + retrieve_offset),
- "render", &len);
-
- if (rec)
- fwrite (rec, 1, len, stdout);
- }
- if (delay_sec > 0)
- sleep(delay_sec);
- ZOOM_resultset_destroy (r);
- ZOOM_connection_destroy (z);
- exit (exit_code);
-}
-# $Id: Makefile.am,v 1.2 2003-05-20 13:52:41 adam Exp $
+# $Id: Makefile.am,v 1.3 2003-05-21 14:39:22 adam Exp $
dist-hook:
-mkdir $(distdir)/records
-mkdir $(distdir)/lock
-mkdir $(distdir)/register
-TESTS = test.sh
+check_SCRIPTS = test.sh
-EXTRA_DIST = $(TESTS) zebra.cfg user.abs
+TESTS = $(check_SCRIPTS)
+
+EXTRA_DIST = zebra.cfg user.abs $(check_SCRIPTS)
-# $Id: Makefile.am,v 1.3 2003-05-20 13:52:41 adam Exp $
+# $Id: Makefile.am,v 1.4 2003-05-21 14:39:23 adam Exp $
-TESTS = test1.sh test2.sh test3.sh \
- simple1.sh
+check_SCRIPTS = test1.sh test2.sh test3.sh simple1.sh
-EXTRA_DIST = $(TESTS) zebra.cfg rec
+TESTS = $(check_SCRIPTS)
+
+EXTRA_DIST = zebra.cfg rec.xml simple1.xml $(check_SCRIPTS)
+++ /dev/null
-<Zthes>
- <termId>10</termId>
- <termName>Sauropoda</termName>
- <termType>PT</termType>
- <relation>
- <relationType>BT</relationType>
- <termId>5</termId>
- <termName>Brontosauria</termName>
- <termType>PT</termType>
- </relation>
- <relation>
- <relationType>NT</relationType>
- <termId>11</termId>
- <termName>Eusauropoda</termName>
- <termType>PT</termType>
- </relation>
-</Zthes>
-<Zthes>
- <termId>5</termId>
- <termName>Brontosauria</termName>
- <termType>PT</termType>
- <relation>
- <relationType>BT</relationType>
- <termId>4</termId>
- <termName>Sauropodomorpha</termName>
- <termType>PT</termType>
- </relation>
- <relation>
- <relationType>NT</relationType>
- <termId>6</termId>
- <termName>Plateosauria</termName>
- <termType>PT</termType>
- </relation>
- <relation>
- <relationType>NT</relationType>
- <termId>10</termId>
- <termName>Sauropoda</termName>
- <termType>PT</termType>
- </relation>
-</Zthes>
--- /dev/null
+<Zthes>
+ <termId>10</termId>
+ <termName>Sauropoda</termName>
+ <termType>PT</termType>
+ <relation>
+ <relationType>BT</relationType>
+ <termId>5</termId>
+ <termName>Brontosauria</termName>
+ <termType>PT</termType>
+ </relation>
+ <relation>
+ <relationType>NT</relationType>
+ <termId>11</termId>
+ <termName>Eusauropoda</termName>
+ <termType>PT</termType>
+ </relation>
+</Zthes>
+<Zthes>
+ <termId>5</termId>
+ <termName>Brontosauria</termName>
+ <termType>PT</termType>
+ <relation>
+ <relationType>BT</relationType>
+ <termId>4</termId>
+ <termName>Sauropodomorpha</termName>
+ <termType>PT</termType>
+ </relation>
+ <relation>
+ <relationType>NT</relationType>
+ <termId>6</termId>
+ <termName>Plateosauria</termName>
+ <termType>PT</termType>
+ </relation>
+ <relation>
+ <relationType>NT</relationType>
+ <termId>10</termId>
+ <termName>Sauropoda</termName>
+ <termType>PT</termType>
+ </relation>
+</Zthes>
+++ /dev/null
-<sgml>
- before
- <tag>
- inside
- </tag>
- after
-</sgml>
-
-
#!/bin/sh
-# $Id: simple1.sh,v 1.2 2003-05-06 17:39:01 adam Exp $
+# $Id: simple1.sh,v 1.3 2003-05-21 14:39:23 adam Exp $
# test with one simple sgml record
LOG=simple1.log
../../index/zebraidx -l $LOG init || exit 1
-../../index/zebraidx -l $LOG update simple1.rec || exit 1
+../../index/zebraidx -l $LOG update simple1.xml || exit 1
echo "Starting server " >> $LOG
../../index/zebrasrv -l $LOG -S unix:socket &
sleep 1
test -f zebrasrv.pid || exit 2
-../testclient unix:socket -c 0 '@attr 1=/sgml/tag before' >> $LOG || exit 1
-../testclient unix:socket -c 1 '@attr 1=/sgml/tag inside' >> $LOG || exit 1
-../testclient unix:socket -c 0 '@attr 1=/sgml/tag after' >> $LOG || exit 1
+../api/testclient unix:socket -c 0 '@attr 1=/sgml/tag before' >> $LOG || exit 1
+../api/testclient unix:socket -c 1 '@attr 1=/sgml/tag inside' >> $LOG || exit 1
+../api/testclient unix:socket -c 0 '@attr 1=/sgml/tag after' >> $LOG || exit 1
-../testclient unix:socket -c 0 '@attr 1=/sgml/none after' >> $LOG || exit 1
+../api/testclient unix:socket -c 0 '@attr 1=/sgml/none after' >> $LOG || exit 1
-../testclient unix:socket -c 1 '@attr 1=/sgml before' >> $LOG || exit 1
-../testclient unix:socket -c 1 '@attr 1=/sgml inside' >> $LOG || exit 1
-../testclient unix:socket -c 1 '@attr 1=/sgml after' >> $LOG || exit 1
+../api/testclient unix:socket -c 1 '@attr 1=/sgml before' >> $LOG || exit 1
+../api/testclient unix:socket -c 1 '@attr 1=/sgml inside' >> $LOG || exit 1
+../api/testclient unix:socket -c 1 '@attr 1=/sgml after' >> $LOG || exit 1
echo "killing server " >> $LOG
kill `cat zebrasrv.pid` || exit 3
--- /dev/null
+<sgml>
+ before
+ <tag>
+ inside
+ </tag>
+ after
+</sgml>
+
+
#!/bin/sh
-# $Id: test1.sh,v 1.2 2003-05-06 17:39:01 adam Exp $
+# $Id: test1.sh,v 1.3 2003-05-21 14:39:23 adam Exp $
LOG=test1.log
rm -f $LOG
../../index/zebraidx -l $LOG init || exit 1
-../../index/zebraidx -l $LOG -t grs.sgml update rec || exit 2
+../../index/zebraidx -l $LOG -t grs.sgml update rec.xml || exit 2
#!/bin/sh
-# $Id: test2.sh,v 1.2 2003-05-06 17:39:01 adam Exp $
+# $Id: test2.sh,v 1.3 2003-05-21 14:39:23 adam Exp $
LOG=test2.log
TMP=test2.tmp
rm -f $LOG
rm -f $TMP
../../index/zebraidx -l $LOG init || exit 1
-../../index/zebraidx -l $LOG -t grs.sgml update rec || exit 2
+../../index/zebraidx -l $LOG -t grs.sgml update rec.xml || exit 2
test -f dict*.mf || exit 1
../../index/zebrasrv -l $LOG -S unix:socket &
sleep 1
test -f zebrasrv.pid || exit 2
-../testclient unix:socket '@attr 1=/Zthes/termName Sauropoda' >$TMP
+../api/testclient unix:socket '@attr 1=/Zthes/termName Sauropoda' >$TMP
echo 'Killing server' >>$LOG
kill `cat zebrasrv.pid` || exit 3
cat $TMP >>$LOG
#!/bin/sh
-# $Id: test3.sh,v 1.2 2003-05-06 17:39:01 adam Exp $
+# $Id: test3.sh,v 1.3 2003-05-21 14:39:23 adam Exp $
LOG=test3.log
TMP=test3.tmp
rm -f $LOG
rm -f $TMP
../../index/zebraidx -l $LOG init || exit 1
-../../index/zebraidx -l $LOG -t grs.sgml update rec || exit 2
+../../index/zebraidx -l $LOG -t grs.sgml update rec.xml || exit 2
test -f dict*.mf || exit 1
../../index/zebrasrv -l $LOG -S unix:socket &
sleep 1
test -f zebrasrv.pid || exit 2
-../testclient unix:socket '@attr 1=/Zthes/relation/termName Sauropoda' >$TMP
+../api/testclient unix:socket '@attr 1=/Zthes/relation/termName Sauropoda' >$TMP
echo 'Killing server' >>$LOG
kill `cat zebrasrv.pid` || exit 3
cat $TMP >>$LOG