Test paths on windows using valid windows paths.
authorJonathan Chambers <joncham@gmail.com>
Wed, 2 May 2012 17:16:04 +0000 (13:16 -0400)
committerJonathan Chambers <joncham@gmail.com>
Wed, 2 May 2012 17:16:04 +0000 (13:16 -0400)
eglib/test/path.c

index aa13ece6f7799c764fd99594d6ba1c58b61e77fa..cd27b421f0b756fac028134e1b47c7b8f54fd388 100644 (file)
@@ -129,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);