glib r7238 - in trunk: . glib/tests
- From: hasselmm svn gnome org
- To: svn-commits-list gnome org
- Subject: glib r7238 - in trunk: . glib/tests
- Date: Mon, 21 Jul 2008 23:34:44 +0000 (UTC)
Author: hasselmm
Date: Mon Jul 21 23:34:44 2008
New Revision: 7238
URL: http://svn.gnome.org/viewvc/glib?rev=7238&view=rev
Log:
Set LANG variable for group caption tests to get reproducable results.
* glib/tests/option-context.c (group_captions()):
Set LANG variable to C in the forked process to get reproducable.
Don't silence the forked process in --verbose mode to support
debugging.
Modified:
trunk/ChangeLog
trunk/glib/tests/option-context.c
Modified: trunk/glib/tests/option-context.c
==============================================================================
--- trunk/glib/tests/option-context.c (original)
+++ trunk/glib/tests/option-context.c Mon Jul 21 23:34:44 2008
@@ -75,22 +75,27 @@
for (j = 0; j < G_N_ELEMENTS (help_variants); ++j)
{
+ GTestTrapFlags trap_flags = 0;
gchar *args[3];
args[0] = __FILE__;
args[1] = help_variants[j];
args[2] = NULL;
+ if (!g_test_verbose ())
+ trap_flags |= G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR;
+
g_test_message ("test setup: args='%s', main-entries=%d, test-entries=%d",
args[1], have_main_entries, have_test_entries);
- if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDOUT |
- G_TEST_TRAP_SILENCE_STDERR))
+ if (g_test_trap_fork (0, trap_flags))
{
gchar **argv = args;
gint argc = 2;
GError *error = NULL;
+ g_setenv ("LANG", "C", TRUE);
+
g_option_context_parse (options, &argc, &argv, &error);
exit(0);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]