mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
tests: Make a string comparison on an error string more relaxed
It currently fails on FreeBSD with: ``` Bail out! GLib:ERROR:../glib/tests/spawn-test.c:111:test_spawn_basics: assertion failed (erroutput == "sort: cannot read: non-existing-file.txt: No such file or directory\n"): ("sort: No such file or directory\n" == "sort: cannot read: non-existing-file.txt: No such file or directory\n") ``` Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
parent
690e64afef
commit
3515170461
@ -107,8 +107,8 @@ test_spawn_basics (void)
|
||||
NULL, &erroutput, NULL, &err);
|
||||
g_assert_no_error (err);
|
||||
g_assert_true (result);
|
||||
g_assert_cmpstr (erroutput, ==,
|
||||
"sort: cannot read: non-existing-file.txt: No such file or directory\n");
|
||||
g_assert_true (g_str_has_prefix (erroutput, "sort: "));
|
||||
g_assert_nonnull (strstr (erroutput, "No such file or directory"));
|
||||
|
||||
g_free (erroutput);
|
||||
erroutput = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user