]> Savannah Git Hosting - gnulib.git/commitdiff
parse-duration tests: Fix test failure on mingw.
authorBruno Haible <bruno@clisp.org>
Thu, 20 Apr 2023 16:51:48 +0000 (18:51 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 20 Apr 2023 16:51:48 +0000 (18:51 +0200)
* tests/test-parse-duration.sh: Transform CRLF to LF in the output,
before analyzing the output.

ChangeLog
tests/test-parse-duration.sh

index 8222100dfd7d18017ea6898a7f83fe5c685bbd62..42b727f88cf6521f431fce3ee35d85764d60a39c 100644 (file)
--- 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.
index e8be5ecb7e5cc60a25ff324639dfed37cbf50efc..cf45913261b4f898e6f9819f7d187449cb865830 100755 (executable)
@@ -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>&-