mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-23 09:28:54 +02:00
gtestutils: Add G_TEST_SUBPROCESS_DEFAULT, G_TEST_TRAP_DEFAULT
This makes calls to test subprocesses with default behaviour more self-documenting. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
@@ -357,6 +357,7 @@
|
||||
|
||||
/**
|
||||
* GTestSubprocessFlags:
|
||||
* @G_TEST_SUBPROCESS_DEFAULT: Default behaviour. Since: 2.74
|
||||
* @G_TEST_SUBPROCESS_INHERIT_STDIN: If this flag is given, the child
|
||||
* process will inherit the parent's stdin. Otherwise, the child's
|
||||
* stdin is redirected to `/dev/null`.
|
||||
@@ -3782,7 +3783,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
* }
|
||||
*
|
||||
* // Reruns this same test in a subprocess
|
||||
* g_test_trap_subprocess (NULL, 0, 0);
|
||||
* g_test_trap_subprocess (NULL, 0, G_TEST_SUBPROCESS_DEFAULT);
|
||||
* g_test_trap_assert_failed ();
|
||||
* g_test_trap_assert_stderr ("*ERROR*too large*");
|
||||
* }
|
||||
|
Reference in New Issue
Block a user