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-21 17:30:52 +0200
commitb5db9cb252e3a13c61b5211020d55c6f28da12d5 (patch)
tree2283dcc6278d7c9c3a95bc7f571a5af814508ddf
parent2017d796d9d13ca35faf7d37802453ff7032cd47 (diff)
downloadgnulib-b5db9cb252e3a13c61b5211020d55c6f28da12d5.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--ChangeLog6
-rwxr-xr-xtests/test-parse-duration.sh3
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index dd6a5b4ebe..abf545d4c4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
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.
* m4/threadlib.m4 (gl_WEAK_SYMBOLS): On mingw, set the result to
"guessing no".
diff --git a/tests/test-parse-duration.sh b/tests/test-parse-duration.sh
index 7f27f72a60..9aabc24ec7 100755
--- a/tests/test-parse-duration.sh
+++ b/tests/test-parse-duration.sh
@@ -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>&-