summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2023-04-20 18:51:48 +0200
committerBruno Haible <bruno@clisp.org>2023-04-20 18:51:48 +0200
commit17970797ba2c8ea455043fd6b6e108b7540b544a (patch)
treee25a474fa942a4732d6bd3db694995f93c39f8f4
parent9cc5e656ca36614ebb8703b8298f31ee02deab43 (diff)
downloadgnulib-17970797ba2c8ea455043fd6b6e108b7540b544a.tar.gz
parse-duration tests: Fix test failure on mingw.
* tests/test-parse-duration.sh: Transform CRLF to LF in the output, before analyzing the output.
-rw-r--r--ChangeLog4
-rwxr-xr-xtests/test-parse-duration.sh3
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 8222100dfd..42b727f88c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2023-04-20 Bruno Haible <bruno@clisp.org>
+ parse-duration tests: Fix test failure on mingw.
+ * tests/test-parse-duration.sh: Transform CRLF to LF in the output,
+ before analyzing the output.
+
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-parse-duration.sh b/tests/test-parse-duration.sh
index e8be5ecb7e..cf45913261 100755
--- a/tests/test-parse-duration.sh
+++ b/tests/test-parse-duration.sh
@@ -60,7 +60,8 @@ cat > "${tmpf}" <<- _EOF_
exec 3< "${tmpf}"
while read line <&3
do
- v=`${CHECKER} ${exe} "${line}"` || { ls -l "${tmpf}"; die "Failed: ${exe} '${line}'"; }
+ v=`${CHECKER} ${exe} "${line}" | LC_ALL=C tr -d '\r'` \
+ || { ls -l "${tmpf}"; die "Failed: ${exe} '${line}'"; }
test $v -eq 38898367 || die $v is not 38898367
done
exec 3>&-