X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Ftst_tpath.c;h=e951b988c038daa61af720c354ed247d0e381c71;hb=dc4414aeda179bc8ebe3fc46ac53e4a24d265d16;hp=eca34a1fc5a459ef6243b55b49847ea3e3468e16;hpb=6f3861dbfb754ceffb8587c64e7631ae6ca3b650;p=yaz-moved-to-github.git diff --git a/test/tst_tpath.c b/test/tst_tpath.c index eca34a1..e951b98 100644 --- a/test/tst_tpath.c +++ b/test/tst_tpath.c @@ -1,8 +1,8 @@ /* - * Copyright (C) 2005-2006, Index Data ApS + * Copyright (C) 2005-2007, Index Data ApS * See the file LICENSE for details. * - * $Id: tst_tpath.c,v 1.1 2006-06-08 10:26:10 adam Exp $ + * $Id: tst_tpath.c,v 1.3 2007-01-03 08:42:16 adam Exp $ * */ #include @@ -17,7 +17,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 +25,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)