X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=eglib%2Ftest%2Fpath.c;h=e6731ad0f13dc63ea71ccbb3edcdf3bedd4076e7;hb=ccbe77fd9cb16624aead0f2c54690e9eb466c3ae;hp=07c73f608ee9123deb51ff35cb37c128d776454d;hpb=496dfbf9ec0fd3143e5dd560a863d916e56a52b8;p=mono.git diff --git a/eglib/test/path.c b/eglib/test/path.c index 07c73f608ee..e6731ad0f13 100644 --- a/eglib/test/path.c +++ b/eglib/test/path.c @@ -77,6 +77,12 @@ test_buildpath () if (strcmp (s, "a/b/c/d") != 0) return FAILED ("13 Got wrong result, got: %s", s); g_free (s); + + s = g_build_path ("/", "/a", "", "/c/", NULL); + if (strcmp (s, "/a/c/") != 0) + return FAILED ("14 Got wrong result, got: %s", s); + g_free (s); + return OK; return OK; } @@ -108,6 +114,15 @@ test_dirname () if (strcmp (s, "/home/dingus") != 0) return FAILED ("Expected /home/dingus, got %s", s); g_free (s); + + s = g_path_get_dirname ("dir.c"); + if (strcmp (s, ".") != 0) + return FAILED ("Expected `.', got %s", s); + g_free (s); + + s = g_path_get_dirname ("/index.html"); + if (strcmp (s, "/") != 0) + return FAILED ("Expected [/], got [%s]", s); return OK; }