[glib] Fix printf-tests on W32 by ifdefing the expected output
- From: Руслан Ижбулатов <ruslanizhb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Fix printf-tests on W32 by ifdefing the expected output
- Date: Sat, 2 Aug 2014 12:31:44 +0000 (UTC)
commit 40650e33239994237917322d4cfecc34e4cc4394
Author: Руслан Ижбулатов <lrn1986 gmail com>
Date: Sat Aug 2 12:22:16 2014 +0000
Fix printf-tests on W32 by ifdefing the expected output
https://bugzilla.gnome.org/show_bug.cgi?id=725515
glib/tests/test-printf.c | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/glib/tests/test-printf.c b/glib/tests/test-printf.c
index c6dd9d9..377e3b5 100644
--- a/glib/tests/test-printf.c
+++ b/glib/tests/test-printf.c
@@ -637,7 +637,11 @@ test_positional_params2 (void)
}
g_test_trap_subprocess (NULL, 0, 0);
g_test_trap_assert_passed ();
+#ifndef G_OS_WIN32
g_test_trap_assert_stdout ("a b\n ab\nabcabc\n");
+#else
+ g_test_trap_assert_stdout ("a b\r\n ab\r\nabcabc\r\n");
+#endif
}
static void
@@ -854,18 +858,25 @@ _Pragma ("GCC diagnostic pop")
static void
test_64bit2 (void)
{
+#ifndef G_OS_WIN32
g_test_trap_subprocess ("/printf/test-64bit/subprocess/base", 0, 0);
g_test_trap_assert_passed ();
g_test_trap_assert_stdout ("123456\n-123456\n123456\n"
"361100\n0361100\n1e240\n"
"0x1e240\n1E240\n");
-#ifdef G_OS_WIN32
+#else
+ g_test_trap_subprocess ("/printf/test-64bit/subprocess/base", 0, 0);
+ g_test_trap_assert_passed ();
+ g_test_trap_assert_stdout ("123456\r\n-123456\r\n123456\r\n"
+ "361100\r\n0361100\r\n1e240\r\n"
+ "0x1e240\r\n1E240\r\n");
+
g_test_trap_subprocess ("/printf/test-64bit/subprocess/win32", 0, 0);
g_test_trap_assert_passed ();
- g_test_trap_assert_stdout ("123456\n-123456\n123456\n"
- "361100\n0361100\n1e240\n"
- "0x1e240\n1E240\n");
+ g_test_trap_assert_stdout ("123456\r\n-123456\r\n123456\r\n"
+ "361100\r\n0361100\r\n1e240\r\n"
+ "0x1e240\r\n1E240\r\n");
#endif
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]