-# $Id: Makefile.am,v 1.1 2004-03-09 15:12:15 adam Exp $
+# $Id: Makefile.am,v 1.2 2004-12-02 13:59:08 adam Exp $
-check_SCRIPTS = test1.sh test2.sh
+check_PROGRAMS = charmap1
-TESTS = $(check_SCRIPTS)
+TESTS = $(check_PROGRAMS)
+
+EXTRA_DIST = zebra.cfg x.xml default.idx string.utf8.chr
+
+charmap1_SOURCES = charmap1.c
+
+AM_CPPFLAGS = -I$(top_srcdir)/include $(YAZINC)
+
+zebralibs = \
+ ../../index/libidzebra-api.la \
+ ../../rset/libidzebra-rset.la \
+ ../../recctrl/libidzebra-recctrl.la \
+ ../../dict/libidzebra-dict.la \
+ ../../isams/libidzebra-isams.la \
+ ../../isamc/libidzebra-isamc.la \
+ ../../isamb/libidzebra-isamb.la \
+ ../../data1/libidzebra-data1.la \
+ ../../bfile/libidzebra-bfile.la \
+ ../../dfa/libidzebra-dfa.la \
+ ../../util/libidzebra-util.la
+
+LDADD = ../api/libtestlib.a $(zebralibs) $(YAZLALIB)
-EXTRA_DIST = zebra.cfg x.xml default.idx string.utf8.chr \
- $(check_SCRIPTS)
--- /dev/null
+/* $Id: charmap1.c,v 1.1 2004-12-02 13:59:08 adam Exp $
+ Copyright (C) 2003,2004
+ Index Data Aps
+
+This file is part of the Zebra server.
+
+Zebra is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+Zebra is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+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.
+*/
+
+#include "../api/testlib.h"
+
+int main(int argc, char **argv)
+{
+ ZebraService zs = start_up(0, argc, argv);
+ ZebraHandle zh = zebra_open(zs);
+ char path[256];
+
+ zebra_select_database(zh, "Default");
+
+ zebra_init(zh);
+
+ zebra_begin_trans(zh, 1);
+ sprintf(path, "%.200s/x.xml", get_srcdir());
+ zebra_repository_update(zh, path);
+ zebra_end_trans(zh);
+ zebra_commit(zh);
+
+ do_query(__LINE__, zh, "@term string æ", 1);
+
+ /* search for UNICODE 1E25 - letter h with dot below */
+ do_query(__LINE__, zh, "@term string ḥ", 1);
+
+
+ return close_down(zh, zs, 0);
+}
+++ /dev/null
-#!/bin/sh
-# $Id: test1.sh,v 1.5 2004-09-27 11:22:39 adam Exp $
-
-pp=${srcdir:-"."}
-
-LOG=test1.log
-rm -f $LOG
-if ../../index/zebraidx -c $pp/zebra.cfg -l $LOG filters|grep grs.xml >/dev/null; then
- ../../index/zebraidx -c $pp/zebra.cfg -l$LOG init
-else
- exit 0
-fi
-../../index/zebraidx -c $pp/zebra.cfg -l$LOG update $pp/*.xml
-../../index/zebrasrv -c $pp/zebra.cfg -l$LOG unix:socket &
-sleep 2
-../api/testclient unix:socket '@term string æ' >tmp1
-echo 'Result count: 1' >tmp2
-kill `cat zebrasrv.pid` || exit 1
-diff tmp1 tmp2 || exit 2
-rm -f tmp1 tmp2
+++ /dev/null
-#!/bin/sh
-# $id$
-
-pp=${srcdir:-"."}
-
-LOG=test2.log
-rm -f $LOG
-if ../../index/zebraidx -c $pp/zebra.cfg -l $LOG filters|grep grs.xml >/dev/null; then
- ../../index/zebraidx -c $pp/zebra.cfg -l$LOG init
-else
- exit 0
-fi
-../../index/zebraidx -c $pp/zebra.cfg -l$LOG update $pp/*.xml
-../../index/zebrasrv -c $pp/zebra.cfg -l$LOG unix:socket &
-sleep 2
-# search for UNICODE 1E25 - letter h with dot below
-../api/testclient unix:socket '@term string ḥ' >tmp1
-echo 'Result count: 1' >tmp2
-kill `cat zebrasrv.pid` || exit 1
-diff tmp1 tmp2 || exit 2
-rm -f tmp1 tmp2