[corlib] Added to TimeZoneInfo method GetDaylightChanges.
[mono.git] / eglib / test / path.c
index 2de726b38ec74907a17cec07d6561ae3741e1d74..e3832a04be493815e423203c66616f86418e33db 100644 (file)
@@ -111,7 +111,6 @@ test_buildpath ()
        if (s [0] != '/')
                return FAILED ("Must have a '/' at the start");
 
-       printf ("Got: %s\n", s);
        g_free (s);
        return OK;
 }
@@ -130,15 +129,16 @@ test_buildfname ()
                return FAILED ("1 Got wrong result, got: %s", s);
        g_free (s);
 
-       s = g_build_filename ("/", "a", NULL);
 #ifdef G_OS_WIN32
-       if (strcmp (s, "\\a") != 0)
+       s = g_build_filename ("C:\\", "a", NULL);
+       if (strcmp (s, "C:\\a") != 0)
 #else
+       s = g_build_filename ("/", "a", NULL);
        if (strcmp (s, "/a") != 0)
 #endif
                return FAILED ("1 Got wrong result, got: %s", s);
 
-#ifndef OS_WIN32
+#ifndef G_OS_WIN32
        s = g_build_filename ("/", "foo", "/bar", "tolo/", "/meo/", NULL);
        if (strcmp (s, "/foo/bar/tolo/meo/") != 0)
                return FAILED ("1 Got wrong result, got: %s", s);
@@ -158,6 +158,11 @@ test_dirname ()
                return FAILED ("Expected c:\\home, got %s", s);
        g_free (s);
 
+       s = g_path_get_dirname ("c:/home/miguel");
+       if (strcmp (s, "c:/home") != 0)
+               return FAILED ("Expected c:/home, got %s", s);
+       g_free (s);
+
        s = g_path_get_dirname ("c:\\home\\dingus\\");
        if (strcmp (s, "c:\\home\\dingus") != 0)
                return FAILED ("Expected c:\\home\\dingus, got %s", s);
@@ -210,10 +215,20 @@ test_basename ()
                return FAILED ("1 Expected dingus, got %s", s);
        g_free (s);
 
+       s = g_path_get_basename ("c:/home/dingus/");
+       if (strcmp (s, "dingus") != 0)
+               return FAILED ("1 Expected dingus, got %s", s);
+       g_free (s);
+
        s = g_path_get_basename ("c:\\home\\dingus");
        if (strcmp (s, "dingus") != 0)
                return FAILED ("2 Expected dingus, got %s", s);
        g_free (s);
+
+       s = g_path_get_basename ("c:/home/dingus");
+       if (strcmp (s, "dingus") != 0)
+               return FAILED ("2 Expected dingus, got %s", s);
+       g_free (s);
 #else
        s = g_path_get_basename ("");
        if (strcmp (s, ".") != 0)