Always use '/' in test paths
authorMatthias Clasen <mclasen@redhat.com>
Sat, 7 Apr 2012 00:50:34 +0000 (20:50 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 7 Apr 2012 00:52:15 +0000 (20:52 -0400)
It does not make much sense to use a platform-dependent
directory separator in these strings, since they are not
filesystem paths.

https://bugzilla.gnome.org/show_bug.cgi?id=673216

glib/gtestutils.c

index fffa4f4..ffdbea3 100644 (file)
@@ -1412,7 +1412,7 @@ g_test_add_vtable (const char       *testpath,
     return;
 
   suite = g_test_get_root();
-  segments = g_strsplit (testpath, G_DIR_SEPARATOR_S, -1);
+  segments = g_strsplit (testpath, "/", -1);
   for (ui = 0; segments[ui] != NULL; ui++)
     {
       const char *seg = segments[ui];
@@ -1471,7 +1471,7 @@ g_test_fail (void)
 
 /**
  * g_test_add_func:
- * @testpath:   Slash-separated test case path name for the test.
+ * @testpath:   /-separated test case path name for the test.
  * @test_func:  The test function to invoke for this test.
  *
  * Create a new test case, similar to g_test_create_case(). However
@@ -1503,7 +1503,7 @@ g_test_add_func (const char *testpath,
 
 /**
  * g_test_add_data_func:
- * @testpath:   Slash-separated test case path name for the test.
+ * @testpath:   /-separated test case path name for the test.
  * @test_data:  Test data argument for the test function.
  * @test_func:  The test function to invoke for this test.
  *