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>
Fri, 21 Apr 2023 15:30:52 +0000 (17:30 +0200)
* tests/test-parse-duration.sh: Transform CRLF to LF in the output,
before analyzing the output.

ChangeLog
tests/test-parse-duration.sh

index dd6a5b4ebe6de8dd39003f713cd1d699a717889c..abf545d4c49c844ee6bb7c086633a184a9d674da 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +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.
+
 2023-04-20  Bruno Haible  <bruno@clisp.org>
 
        Fix uses of libwinpthread on mingw 10.
index 7f27f72a60f0b320ff9e13f2374f616ba3d807f2..9aabc24ec7b63900f307c24e2b43aba22f5a87ee 100755 (executable)
@@ -62,7 +62,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>&-