[glib] Fix the tests on win32
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Fix the tests on win32
- Date: Tue, 20 Mar 2012 09:21:31 +0000 (UTC)
commit f23e7c3ef988a251c42a8a8f7e60566e0bab76fb
Author: Alexander Larsson <alexl redhat com>
Date: Tue Mar 20 10:20:18 2012 +0100
Fix the tests on win32
There was some unix-specific pathname handling in the test utils
which broke the css tests on win32.
glib/gtestutils.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/glib/gtestutils.c b/glib/gtestutils.c
index 4707375..e9d7f84 100644
--- a/glib/gtestutils.c
+++ b/glib/gtestutils.c
@@ -21,6 +21,7 @@
#include "config.h"
#include "gtestutils.h"
+#include "gfileutils.h"
#include <sys/types.h>
#ifdef G_OS_UNIX
@@ -1404,14 +1405,14 @@ g_test_add_vtable (const char *testpath,
GTestSuite *suite;
g_return_if_fail (testpath != NULL);
- g_return_if_fail (testpath[0] == '/');
+ g_return_if_fail (g_path_is_absolute (testpath));
g_return_if_fail (fixture_test_func != NULL);
if (g_slist_find_custom (test_paths_skipped, testpath, (GCompareFunc)g_strcmp0))
return;
suite = g_test_get_root();
- segments = g_strsplit (testpath, "/", -1);
+ segments = g_strsplit (testpath, G_DIR_SEPARATOR_S, -1);
for (ui = 0; segments[ui] != NULL; ui++)
{
const char *seg = segments[ui];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]