Skip to content

gtestutils: Add g_test_trap_subprocess_with_envp() for testing envs

Philip Withnall requested to merge pwithnall/glib:test-trap-subprocess-envp into main

This is a variant of g_test_trap_subprocess() which allows the environment for the child process to be specified. This is quite useful when you want to test code which reads environment variables, as it’s not safe to set those after the start of main().

This will be useful within and outwith GLib for testing such code.

Signed-off-by: Philip Withnall pwithnall@gnome.org

Merge request reports