`glib / spawn-test` fails with non-English locale
Run the test with a non-English locale:
LANG=zh_CN.UTF-8 meson test spawn-test -v
Results:
1/1 glib:glib / spawn-test RUNNING
>>> MALLOC_PERTURB_=67 G_TEST_BUILDDIR=/home/xry111/sources/11.3/glib-2.74.0/b/glib/tests G_TEST_SRCDIR=/home/xry111/sources/11.3/glib-2.74.0/glib/tests MALLOC_CHECK_=2 G_DEBUG=gc-friendly /home/xry111/sources/11.3/glib-2.74.0/b/glib/tests/spawn-test
――――――――――――――――――――――――――――――――――――― ✀ ―――――――――――――――――――――――――――――――――――――
# random seed: R02S2a4b9f50e4d39ef0bd270e4304462aeb
1..1
# Start of spawn tests
**
GLib:ERROR:../glib/tests/spawn-test.c:113:test_spawn_basics: 'strstr (erroutput, "No such file or directory")' should not be NULL
Bail out! GLib:ERROR:../glib/tests/spawn-test.c:113:test_spawn_basics: 'strstr (erroutput, "No such file or directory")' should not be NULL
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
1/1 glib:glib / spawn-test FAIL 0.06s killed by signal 6 SIGABRT
Because sort
outputs translated error message for "No such file or directory".
setlocale (LC_ALL, "C");
in the test does not work, I guess we need something like putenv ("LC_ALL=C");
but I'm not sure if it's proper in the test framework.