[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
dfa tests: Fix test failure on mingw
From: |
Bruno Haible |
Subject: |
dfa tests: Fix test failure on mingw |
Date: |
Thu, 20 Apr 2023 18:39:50 +0200 |
On mingw 10, I see this test failure:
FAIL: test-dfa-invalid-char-class.sh
====================================
--- exp 2023-04-20 06:15:56.778614400 +0200
+++ out 2023-04-20 06:15:56.857719400 +0200
@@ -1 +1 @@
-dfaerror: invalid character class
+dfaerror: invalid character class
FAIL test-dfa-invalid-char-class.sh (exit status: 1)
The cause is that the expected output has a Unix LF, whereas the actual
output has a CRLF. This patch fixes the failure.
2023-04-20 Bruno Haible <bruno@clisp.org>
dfa tests: Fix test failure on mingw.
* tests/test-dfa-invalid-char-class.sh: Transform CRLF to LF in the
output, before comparing with the expected output.
diff --git a/tests/test-dfa-invalid-char-class.sh
b/tests/test-dfa-invalid-char-class.sh
index 1428d7966a..b9b18980b6 100755
--- a/tests/test-dfa-invalid-char-class.sh
+++ b/tests/test-dfa-invalid-char-class.sh
@@ -24,7 +24,8 @@ path_prepend_ .
fail=0
echo 'dfaerror: invalid character class' > exp
-LC_ALL=C ${CHECKER} test-dfa-match-aux '[[:foo:]]' a > out 2>&1
+LC_ALL=C ${CHECKER} test-dfa-match-aux '[[:foo:]]' a > tmp 2>&1
+LC_ALL=C tr -d '\r' < tmp > out
compare exp out || fail=1
Exit $fail
- dfa tests: Fix test failure on mingw,
Bruno Haible <=