More interesting case using recordId
[idzebra-moved-to-github.git] / test / marcxml / t2.c
index b282708..fc854c7 100644 (file)
@@ -1,6 +1,6 @@
-/* $Id: t2.c,v 1.1 2004-12-02 12:04:49 adam Exp $
-   Copyright (C) 2003,2004
-   Index Data Aps
+/* $Id: t2.c,v 1.5 2005-09-13 11:51:08 adam Exp $
+   Copyright (C) 1995-2005
+   Index Data ApS
 
 This file is part of the Zebra server.
 
@@ -20,12 +20,13 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 02111-1307, USA.
 */
 
-#include "../api/testlib.h"
+#include "testlib.h"
 
 int main(int argc, char **argv)
 {
     ZebraService zs = start_up(0, argc, argv);
-    ZebraHandle zh = zebra_open(zs);
+    ZebraHandle zh = zebra_open(zs, 0);
+    char path[256];
 
     zebra_select_database(zh, "Default");
 
@@ -34,7 +35,9 @@ int main(int argc, char **argv)
     zebra_set_resource(zh, "recordType", "grs.marcxml.record");
     
     zebra_begin_trans(zh, 1);
-    zebra_repository_update(zh, "sample-marc");
+
+    sprintf(path, "%.200s/sample-marc", get_srcdir());
+    zebra_repository_update(zh, path);
     zebra_end_trans(zh);
     zebra_commit(zh);