mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-24 16:16:52 +02:00
Merge branch 'encoding-prefix' into 'master'
tests: Rename macro to avoid conflict with encoding prefix See merge request GNOME/glib!521
This commit is contained in:
commit
af77e47e93
@ -276,36 +276,36 @@ test_build_filename (void)
|
||||
#ifdef G_OS_WIN32
|
||||
|
||||
/* Test also using the slash as file name separator */
|
||||
#define U "/"
|
||||
#define Z "/"
|
||||
/* check_string (g_build_filename (NULL), ""); */
|
||||
check_string (g_build_filename (U, NULL), U);
|
||||
check_string (g_build_filename (U"x", NULL), U"x");
|
||||
check_string (g_build_filename ("x"U, NULL), "x"U);
|
||||
check_string (g_build_filename ("", U"x", NULL), U"x");
|
||||
check_string (g_build_filename ("", U"x", NULL), U"x");
|
||||
check_string (g_build_filename (U, "x", NULL), U"x");
|
||||
check_string (g_build_filename (U U, "x", NULL), U U"x");
|
||||
check_string (g_build_filename (U S, "x", NULL), U S"x");
|
||||
check_string (g_build_filename ("x"U, "", NULL), "x"U);
|
||||
check_string (g_build_filename ("x"S"y", "z"U"a", NULL), "x"S"y"S"z"U"a");
|
||||
check_string (g_build_filename ("x", U, NULL), "x"U);
|
||||
check_string (g_build_filename ("x", U U, NULL), "x"U U);
|
||||
check_string (g_build_filename ("x", S U, NULL), "x"S U);
|
||||
check_string (g_build_filename (U"x", "y", NULL), U"x"U"y");
|
||||
check_string (g_build_filename ("x", "y"U, NULL), "x"U"y"U);
|
||||
check_string (g_build_filename (U"x"U, U"y"U, NULL), U"x"U"y"U);
|
||||
check_string (g_build_filename (U"x"U U, U U"y"U, NULL), U"x"U"y"U);
|
||||
check_string (g_build_filename ("x", U, "y", NULL), "x"U"y");
|
||||
check_string (g_build_filename ("x", U U, "y", NULL), "x"U"y");
|
||||
check_string (g_build_filename ("x", U S, "y", NULL), "x"S"y");
|
||||
check_string (g_build_filename ("x", S U, "y", NULL), "x"U"y");
|
||||
check_string (g_build_filename ("x", U "y", "z", NULL), "x"U"y"U"z");
|
||||
check_string (g_build_filename (Z, NULL), Z);
|
||||
check_string (g_build_filename (Z"x", NULL), Z"x");
|
||||
check_string (g_build_filename ("x"Z, NULL), "x"Z);
|
||||
check_string (g_build_filename ("", Z"x", NULL), Z"x");
|
||||
check_string (g_build_filename ("", Z"x", NULL), Z"x");
|
||||
check_string (g_build_filename (Z, "x", NULL), Z"x");
|
||||
check_string (g_build_filename (Z Z, "x", NULL), Z Z"x");
|
||||
check_string (g_build_filename (Z S, "x", NULL), Z S"x");
|
||||
check_string (g_build_filename ("x"Z, "", NULL), "x"Z);
|
||||
check_string (g_build_filename ("x"S"y", "z"Z"a", NULL), "x"S"y"S"z"Z"a");
|
||||
check_string (g_build_filename ("x", Z, NULL), "x"Z);
|
||||
check_string (g_build_filename ("x", Z Z, NULL), "x"Z Z);
|
||||
check_string (g_build_filename ("x", S Z, NULL), "x"S Z);
|
||||
check_string (g_build_filename (Z"x", "y", NULL), Z"x"Z"y");
|
||||
check_string (g_build_filename ("x", "y"Z, NULL), "x"Z"y"Z);
|
||||
check_string (g_build_filename (Z"x"Z, Z"y"Z, NULL), Z"x"Z"y"Z);
|
||||
check_string (g_build_filename (Z"x"Z Z, Z Z"y"Z, NULL), Z"x"Z"y"Z);
|
||||
check_string (g_build_filename ("x", Z, "y", NULL), "x"Z"y");
|
||||
check_string (g_build_filename ("x", Z Z, "y", NULL), "x"Z"y");
|
||||
check_string (g_build_filename ("x", Z S, "y", NULL), "x"S"y");
|
||||
check_string (g_build_filename ("x", S Z, "y", NULL), "x"Z"y");
|
||||
check_string (g_build_filename ("x", Z "y", "z", NULL), "x"Z"y"Z"z");
|
||||
check_string (g_build_filename ("x", S "y", "z", NULL), "x"S"y"S"z");
|
||||
check_string (g_build_filename ("x", S "y", "z", U, "a", "b", NULL), "x"S"y"S"z"U"a"U"b");
|
||||
check_string (g_build_filename (U"x"U, U"y"U, U"z"U, NULL), U"x"U"y"U"z"U);
|
||||
check_string (g_build_filename (U U"x"U U, U U"y"U U, U U"z"U U, NULL), U U"x"U"y"U"z"U U);
|
||||
check_string (g_build_filename ("x", S "y", "z", Z, "a", "b", NULL), "x"S"y"S"z"Z"a"Z"b");
|
||||
check_string (g_build_filename (Z"x"Z, Z"y"Z, Z"z"Z, NULL), Z"x"Z"y"Z"z"Z);
|
||||
check_string (g_build_filename (Z Z"x"Z Z, Z Z"y"Z Z, Z Z"z"Z Z, NULL), Z Z"x"Z"y"Z"z"Z Z);
|
||||
|
||||
#undef U
|
||||
#undef Z
|
||||
|
||||
#endif /* G_OS_WIN32 */
|
||||
|
||||
@ -366,64 +366,64 @@ test_build_filenamev (void)
|
||||
#ifdef G_OS_WIN32
|
||||
|
||||
/* Test also using the slash as file name separator */
|
||||
#define U "/"
|
||||
#define Z "/"
|
||||
args[0] = NULL;
|
||||
check_string (g_build_filenamev (args), "");
|
||||
args[0] = U; args[1] = NULL;
|
||||
check_string (g_build_filenamev (args), U);
|
||||
args[0] = U"x"; args[1] = NULL;
|
||||
check_string (g_build_filenamev (args), U"x");
|
||||
args[0] = "x"U; args[1] = NULL;
|
||||
check_string (g_build_filenamev (args), "x"U);
|
||||
args[0] = ""; args[1] = U"x"; args[2] = NULL;
|
||||
check_string (g_build_filenamev (args), U"x");
|
||||
args[0] = ""; args[1] = U"x"; args[2] = NULL;
|
||||
check_string (g_build_filenamev (args), U"x");
|
||||
args[0] = U; args[1] = "x"; args[2] = NULL;
|
||||
check_string (g_build_filenamev (args), U"x");
|
||||
args[0] = U U; args[1] = "x"; args[2] = NULL;
|
||||
check_string (g_build_filenamev (args), U U"x");
|
||||
args[0] = U S; args[1] = "x"; args[2] = NULL;
|
||||
check_string (g_build_filenamev (args), U S"x");
|
||||
args[0] = "x"U; args[1] = ""; args[2] = NULL;
|
||||
check_string (g_build_filenamev (args), "x"U);
|
||||
args[0] = "x"S"y"; args[1] = "z"U"a"; args[2] = NULL;
|
||||
check_string (g_build_filenamev (args), "x"S"y"S"z"U"a");
|
||||
args[0] = "x"; args[1] = U; args[2] = NULL;
|
||||
check_string (g_build_filenamev (args), "x"U);
|
||||
args[0] = "x"; args[1] = U U; args[2] = NULL;
|
||||
check_string (g_build_filenamev (args), "x"U U);
|
||||
args[0] = "x"; args[1] = S U; args[2] = NULL;
|
||||
check_string (g_build_filenamev (args), "x"S U);
|
||||
args[0] = U"x"; args[1] = "y"; args[2] = NULL;
|
||||
check_string (g_build_filenamev (args), U"x"U"y");
|
||||
args[0] = "x"; args[1] = "y"U; args[2] = NULL;
|
||||
check_string (g_build_filenamev (args), "x"U"y"U);
|
||||
args[0] = U"x"U; args[1] = U"y"U; args[2] = NULL;
|
||||
check_string (g_build_filenamev (args), U"x"U"y"U);
|
||||
args[0] = U"x"U U; args[1] = U U"y"U; args[2] = NULL;
|
||||
check_string (g_build_filenamev (args), U"x"U"y"U);
|
||||
args[0] = "x"; args[1] = U; args[2] = "y", args[3] = NULL;
|
||||
check_string (g_build_filenamev (args), "x"U"y");
|
||||
args[0] = "x"; args[1] = U U; args[2] = "y", args[3] = NULL;
|
||||
check_string (g_build_filenamev (args), "x"U"y");
|
||||
args[0] = "x"; args[1] = U S; args[2] = "y", args[3] = NULL;
|
||||
args[0] = Z; args[1] = NULL;
|
||||
check_string (g_build_filenamev (args), Z);
|
||||
args[0] = Z"x"; args[1] = NULL;
|
||||
check_string (g_build_filenamev (args), Z"x");
|
||||
args[0] = "x"Z; args[1] = NULL;
|
||||
check_string (g_build_filenamev (args), "x"Z);
|
||||
args[0] = ""; args[1] = Z"x"; args[2] = NULL;
|
||||
check_string (g_build_filenamev (args), Z"x");
|
||||
args[0] = ""; args[1] = Z"x"; args[2] = NULL;
|
||||
check_string (g_build_filenamev (args), Z"x");
|
||||
args[0] = Z; args[1] = "x"; args[2] = NULL;
|
||||
check_string (g_build_filenamev (args), Z"x");
|
||||
args[0] = Z Z; args[1] = "x"; args[2] = NULL;
|
||||
check_string (g_build_filenamev (args), Z Z"x");
|
||||
args[0] = Z S; args[1] = "x"; args[2] = NULL;
|
||||
check_string (g_build_filenamev (args), Z S"x");
|
||||
args[0] = "x"Z; args[1] = ""; args[2] = NULL;
|
||||
check_string (g_build_filenamev (args), "x"Z);
|
||||
args[0] = "x"S"y"; args[1] = "z"Z"a"; args[2] = NULL;
|
||||
check_string (g_build_filenamev (args), "x"S"y"S"z"Z"a");
|
||||
args[0] = "x"; args[1] = Z; args[2] = NULL;
|
||||
check_string (g_build_filenamev (args), "x"Z);
|
||||
args[0] = "x"; args[1] = Z Z; args[2] = NULL;
|
||||
check_string (g_build_filenamev (args), "x"Z Z);
|
||||
args[0] = "x"; args[1] = S Z; args[2] = NULL;
|
||||
check_string (g_build_filenamev (args), "x"S Z);
|
||||
args[0] = Z"x"; args[1] = "y"; args[2] = NULL;
|
||||
check_string (g_build_filenamev (args), Z"x"Z"y");
|
||||
args[0] = "x"; args[1] = "y"Z; args[2] = NULL;
|
||||
check_string (g_build_filenamev (args), "x"Z"y"Z);
|
||||
args[0] = Z"x"Z; args[1] = Z"y"Z; args[2] = NULL;
|
||||
check_string (g_build_filenamev (args), Z"x"Z"y"Z);
|
||||
args[0] = Z"x"Z Z; args[1] = Z Z"y"Z; args[2] = NULL;
|
||||
check_string (g_build_filenamev (args), Z"x"Z"y"Z);
|
||||
args[0] = "x"; args[1] = Z; args[2] = "y", args[3] = NULL;
|
||||
check_string (g_build_filenamev (args), "x"Z"y");
|
||||
args[0] = "x"; args[1] = Z Z; args[2] = "y", args[3] = NULL;
|
||||
check_string (g_build_filenamev (args), "x"Z"y");
|
||||
args[0] = "x"; args[1] = Z S; args[2] = "y", args[3] = NULL;
|
||||
check_string (g_build_filenamev (args), "x"S"y");
|
||||
args[0] = "x"; args[1] = S U; args[2] = "y", args[3] = NULL;
|
||||
check_string (g_build_filenamev (args), "x"U"y");
|
||||
args[0] = "x"; args[1] = U "y"; args[2] = "z", args[3] = NULL;
|
||||
check_string (g_build_filenamev (args), "x"U"y"U"z");
|
||||
args[0] = "x"; args[1] = S Z; args[2] = "y", args[3] = NULL;
|
||||
check_string (g_build_filenamev (args), "x"Z"y");
|
||||
args[0] = "x"; args[1] = Z "y"; args[2] = "z", args[3] = NULL;
|
||||
check_string (g_build_filenamev (args), "x"Z"y"Z"z");
|
||||
args[0] = "x"; args[1] = S "y"; args[2] = "z", args[3] = NULL;
|
||||
check_string (g_build_filenamev (args), "x"S"y"S"z");
|
||||
args[0] = "x"; args[1] = S "y"; args[2] = "z", args[3] = U;
|
||||
args[0] = "x"; args[1] = S "y"; args[2] = "z", args[3] = Z;
|
||||
args[4] = "a"; args[5] = "b"; args[6] = NULL;
|
||||
check_string (g_build_filenamev (args), "x"S"y"S"z"U"a"U"b");
|
||||
args[0] = U"x"U; args[1] = U"y"U; args[2] = U"z"U, args[3] = NULL;
|
||||
check_string (g_build_filenamev (args), U"x"U"y"U"z"U);
|
||||
args[0] = U U"x"U U; args[1] = U U"y"U U; args[2] = U U"z"U U, args[3] = NULL;
|
||||
check_string (g_build_filenamev (args), U U"x"U"y"U"z"U U);
|
||||
check_string (g_build_filenamev (args), "x"S"y"S"z"Z"a"Z"b");
|
||||
args[0] = Z"x"Z; args[1] = Z"y"Z; args[2] = Z"z"Z, args[3] = NULL;
|
||||
check_string (g_build_filenamev (args), Z"x"Z"y"Z"z"Z);
|
||||
args[0] = Z Z"x"Z Z; args[1] = Z Z"y"Z Z; args[2] = Z Z"z"Z Z, args[3] = NULL;
|
||||
check_string (g_build_filenamev (args), Z Z"x"Z"y"Z"z"Z Z);
|
||||
|
||||
#undef U
|
||||
#undef Z
|
||||
|
||||
#endif /* G_OS_WIN32 */
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user