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:
Philip Withnall 2022-04-08 12:25:59 +01:00
parent 690e64afef
commit 3515170461

View File

@ -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;