Oops forgot this
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 28 Apr 2005 14:58:24 +0000 (14:58 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 28 Apr 2005 14:58:24 +0000 (14:58 +0000)
test/xslt/xslt1.c [new file with mode: 0644]

diff --git a/test/xslt/xslt1.c b/test/xslt/xslt1.c
new file mode 100644 (file)
index 0000000..eddc5d7
--- /dev/null
@@ -0,0 +1,49 @@
+/* $Id: xslt1.c,v 1.1 2005-04-28 14:58:24 adam Exp $
+   Copyright (C) 1995-2005
+   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 "testlib.h"
+       
+int main(int argc, char **argv)
+{
+    char path[256];
+
+    ZebraService zs = start_up(0, argc, argv);
+    ZebraHandle  zh = zebra_open(zs);
+
+    check_filter(zs, "xslt");
+    zebra_select_database(zh, "Default");
+
+    zebra_init(zh);
+
+    zebra_begin_trans(zh, 1);
+    sprintf(path, "%.200s/marc-col.xml", get_srcdir());
+    zebra_repository_update(zh, path);
+
+    zebra_end_trans(zh);
+    zebra_commit(zh);
+
+    do_query(__LINE__, zh, "@attr 1=title computer", 3);
+    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);
+}