[glib: 1/3] tests: Fix checks for line endings in spawn-test on Windows
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/3] tests: Fix checks for line endings in spawn-test on Windows
- Date: Mon, 17 Oct 2022 16:12:48 +0000 (UTC)
commit 06ff700ad897a39a512062b9f38b75bfbba2dec2
Author: Philip Withnall <pwithnall endlessos org>
Date: Fri Oct 14 17:56:04 2022 +0100
tests: Fix checks for line endings in spawn-test on Windows
Signed-off-by: Philip Withnall <pwithnall endlessos org>
glib/tests/spawn-test.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/glib/tests/spawn-test.c b/glib/tests/spawn-test.c
index 4e54ab258e..44d585dcfe 100644
--- a/glib/tests/spawn-test.c
+++ b/glib/tests/spawn-test.c
@@ -97,7 +97,10 @@ test_spawn_basics (void)
&output, &erroutput, NULL, &err);
g_assert_no_error (err);
g_assert_true (result);
- g_assert_cmpstr (output, ==, "line 2\nline first\nline last\n");
+ if (strchr (output, '\r') != NULL)
+ g_assert_cmpstr (output, ==, "line 2\r\nline first\r\nline last\r\n");
+ else
+ g_assert_cmpstr (output, ==, "line 2\nline first\nline last\n");
g_assert_cmpstr (erroutput, ==, "");
g_free (output);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]