Result of libxml2 turbo marc conversion
[yaz-moved-to-github.git] / test / tst_tpath.c
index eca34a1..d409624 100644 (file)
@@ -1,9 +1,6 @@
-/*
- * Copyright (C) 2005-2006, Index Data ApS
+/* This file is part of the YAZ toolkit.
+ * Copyright (C) 1995-2010 Index Data
  * See the file LICENSE for details.
- *
- * $Id: tst_tpath.c,v 1.1 2006-06-08 10:26:10 adam Exp $
- *
  */
 #include <yaz/tpath.h>
 #include <yaz/test.h>
@@ -17,7 +14,7 @@
 
 static void tst_tpath(void)
 {
-    char fullpath[1024];
+    char fullpath[FILENAME_MAX];
 
     YAZ_CHECK(!yaz_filepath_resolve("etc", 0, 0, fullpath));
     YAZ_CHECK(!yaz_filepath_resolve("etc", "", 0, fullpath)); /* bug #606 */
@@ -25,13 +22,16 @@ static void tst_tpath(void)
     YAZ_CHECK(!yaz_filepath_resolve("does_not_exist", "", 0, fullpath));
     YAZ_CHECK(!yaz_filepath_resolve("does_not_exist", ".", 0, fullpath));
     YAZ_CHECK(yaz_filepath_resolve("tst_tpath", 0, 0, fullpath));
-    YAZ_CHECK(yaz_filepath_resolve("tst_tpath", "", 0, fullpath));
+
+    YAZ_CHECK(!yaz_filepath_resolve("tst_tpath", "", 0, fullpath));
     YAZ_CHECK(yaz_filepath_resolve("tst_tpath", ".", 0, fullpath));
+
     YAZ_CHECK(!yaz_filepath_resolve("tst_tpath", "unknown_dir", 0, fullpath));
     YAZ_CHECK(yaz_filepath_resolve("tst_tpath", "unknown_dir:.", 0, fullpath));
-    YAZ_CHECK(yaz_filepath_resolve("tst_tpath", "unknown_dir:", 0, fullpath));
+    YAZ_CHECK(!yaz_filepath_resolve("tst_tpath", "unknown_dir:", 0, fullpath));
     YAZ_CHECK(!yaz_filepath_resolve("tst_tpath", "unknown_dir:c:", 0, fullpath));
     YAZ_CHECK(!yaz_filepath_resolve("tst_tpath", "unknown_dir:c:\\other", 0, fullpath));
+
 }
 
 int main(int argc, char **argv)
@@ -44,6 +44,7 @@ int main(int argc, char **argv)
 /*
  * Local variables:
  * c-basic-offset: 4
+ * c-file-style: "Stroustrup"
  * indent-tabs-mode: nil
  * End:
  * vim: shiftwidth=4 tabstop=8 expandtab