[glib] gio/tests/g-file.c: fix some path checks on win32
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gio/tests/g-file.c: fix some path checks on win32
- Date: Mon, 6 Aug 2012 15:34:08 +0000 (UTC)
commit 2793b39ea3de4fdac5cf154c7a12ac7ba82657d2
Author: Dan Winship <danw gnome org>
Date: Fri Feb 3 11:12:02 2012 -0500
gio/tests/g-file.c: fix some path checks on win32
Some of the tests needed to be modified to use G_DIR_SEPARATOR_S
rather than hardcoded "/"s.
https://bugzilla.gnome.org/show_bug.cgi?id=669331
gio/tests/g-file.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/gio/tests/g-file.c b/gio/tests/g-file.c
index 8bba592..8f0a18b 100644
--- a/gio/tests/g-file.c
+++ b/gio/tests/g-file.c
@@ -261,8 +261,8 @@ test_g_file_get_parse_name_utf8 (void)
{
const struct TestPathsWithOper strings[] =
{
- {"/", 0, FALSE, "/"},
- {"file:///", 0, TRUE, "/"},
+ {G_DIR_SEPARATOR_S, 0, FALSE, G_DIR_SEPARATOR_S},
+ {"file:///", 0, TRUE, G_DIR_SEPARATOR_S},
{"totalnonsense", 0, FALSE, NULL},
{"/UTF-8 p\xc5\x99\xc3\xadli\xc5\xa1 \xc5\xbelu\xc5\xa5ou\xc4\x8dk\xc3\xbd k\xc5\xaf\xc5\x88", 0, FALSE, NULL /* Depends on local file encoding */},
{"file:///invalid%08/UTF-8%20p%C5%99%C3%ADli%C5%A1%20%C5%BElu%C5%A5ou%C4%8Dk%C3%BD%20k%C5%AF%C5%88/", 0, TRUE, "file:///invalid%08/UTF-8%20p\xc5\x99\xc3\xadli\xc5\xa1%20\xc5\xbelu\xc5\xa5ou\xc4\x8dk\xc3\xbd%20k\xc5\xaf\xc5\x88"},
@@ -400,21 +400,21 @@ test_g_file_has_prefix (void)
const struct TestPathsWithOper dirs[] =
{
/* path1 equal uri path2 path3 */
- {"/dir1", TRUE, FALSE, "/dir1/dir2/dir3/", "dir2/dir3"},
- {"/dir1/", TRUE, FALSE, "/dir1/dir2/dir3/", "dir2/dir3"},
- {"/dir1", TRUE, FALSE, "/dir1/dir2/dir3", "dir2/dir3"},
- {"/dir1/", TRUE, FALSE, "/dir1/dir2/dir3", "dir2/dir3"},
+ {"/dir1", TRUE, FALSE, "/dir1/dir2/dir3/", "dir2" G_DIR_SEPARATOR_S "dir3"},
+ {"/dir1/", TRUE, FALSE, "/dir1/dir2/dir3/", "dir2" G_DIR_SEPARATOR_S "dir3"},
+ {"/dir1", TRUE, FALSE, "/dir1/dir2/dir3", "dir2" G_DIR_SEPARATOR_S "dir3"},
+ {"/dir1/", TRUE, FALSE, "/dir1/dir2/dir3", "dir2" G_DIR_SEPARATOR_S "dir3"},
{"/tmp/", FALSE, FALSE, "/something/", NULL},
{"/dir1/dir2", FALSE, FALSE, "/dir1/", NULL},
- {"//dir1/new", TRUE, FALSE, "//dir1/new/dir2/dir3", "dir2/dir3"},
+ {"//dir1/new", TRUE, FALSE, "//dir1/new/dir2/dir3", "dir2" G_DIR_SEPARATOR_S "dir3"},
{"/dir/UTF-8 p\xc5\x99\xc3\xadli\xc5\xa1 \xc5\xbelu\xc5\xa5ou\xc4\x8dk\xc3\xbd k\xc5\xaf\xc5\x88", TRUE, FALSE, "/dir/UTF-8 p\xc5\x99\xc3\xadli\xc5\xa1 \xc5\xbelu\xc5\xa5ou\xc4\x8dk\xc3\xbd k\xc5\xaf\xc5\x88/dir2", "dir2"},
- {"file:///dir1", TRUE, TRUE, "file:///dir1/dir2/dir3/", "dir2/dir3"},
- {"file:///dir1/", TRUE, TRUE, "file:///dir1/dir2/dir3/", "dir2/dir3"},
- {"file:///dir1", TRUE, TRUE, "file:///dir1/dir2/dir3", "dir2/dir3"},
- {"file:///dir1/", TRUE, TRUE, "file:///dir1/dir2/dir3", "dir2/dir3"},
+ {"file:///dir1", TRUE, TRUE, "file:///dir1/dir2/dir3/", "dir2" G_DIR_SEPARATOR_S "dir3"},
+ {"file:///dir1/", TRUE, TRUE, "file:///dir1/dir2/dir3/", "dir2" G_DIR_SEPARATOR_S "dir3"},
+ {"file:///dir1", TRUE, TRUE, "file:///dir1/dir2/dir3", "dir2" G_DIR_SEPARATOR_S "dir3"},
+ {"file:///dir1/", TRUE, TRUE, "file:///dir1/dir2/dir3", "dir2" G_DIR_SEPARATOR_S "dir3"},
{"file:///tmp/", FALSE, TRUE, "file:///something/", NULL},
{"file:///dir1/dir2", FALSE, TRUE, "file:///dir1/", NULL},
- {"file:////dir1/new", TRUE, TRUE, "file:////dir1/new/dir2/dir3", "dir2/dir3"},
+ {"file:////dir1/new", TRUE, TRUE, "file:////dir1/new/dir2/dir3", "dir2" G_DIR_SEPARATOR_S "dir3"},
{"file:///dir/UTF-8%20p%C5%99%C3%ADli%C5%A1%20%C5%BElu%C5%A5ou%C4%8Dk%C3%BD%20k%C5%AF%C5%88", TRUE, TRUE, "file:///dir/UTF-8%20p%C5%99%C3%ADli%C5%A1%20%C5%BElu%C5%A5ou%C4%8Dk%C3%BD%20k%C5%AF%C5%88/dir2", "dir2"},
#if 0
{"dav://www.gtk.org/plan/", TRUE, TRUE, "dav://www.gtk.org/plan/meetings/20071218.txt", "meetings/20071218.txt"},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]