[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
a couple of patches to deal with w32 semantics
From: |
Ralf Wildenhues |
Subject: |
a couple of patches to deal with w32 semantics |
Date: |
Sun, 2 Mar 2008 13:27:46 +0100 |
User-agent: |
Mutt/1.5.17+20080114 (2008-01-14) |
Hello,
here are two more patches for w32. When applied, the testsuite passes
for me on MinGW and Cygwin. I'd appreciate if someone firmer than me
with the specialities on these system could confirm that my rationales
are not nonsense.
OK to apply?
Thanks,
Ralf
Fix bogus testsuite failure on Cygwin due to insufficient permissions.
* tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS):
config.status may succeed to create an output file on Cygwin
even in a directory without write permission, because it creates
the file in a temporary directory and moves it to `.' later,
which apparently succeeds on Cygwin. Test for this setup and
avoid false failure in this case.
diff --git a/tests/torture.at b/tests/torture.at
index ec86e22..191ab3f 100644
--- a/tests/torture.at
+++ b/tests/torture.at
@@ -211,8 +211,11 @@ AT_CHECK([grep OK $1], [], [OK
AT_CHECK_CONFIGURE([what_to_test=var-$1 --no-create])
# config.status might be stupidly expecting data on stdin, if it's
# really broken...
+# If making a directory and moving files from there to . succeeds, we
+# are probably on cygwin.
chmod a-w .
-AT_CHECK([./config.status var-$1 </dev/null], [1], [ignore], [ignore])
+AT_CHECK([./config.status var-$1 </dev/null], [1], [ignore], [ignore],
+ [AT_CHECK([{ test -d t || mkdir t; } && : >t/foo && mv -f t/foo
./foo])])
chmod u+w .
])# AT_CHECK_CONFIG_CREATION_NOWRITE
On MinGW, substitution of CR and 0xFF fails.
* tests/torture.at (Substitute and define special characters):
MinGW awk cannot handle 0xFF, and on MinGW, the test does the
wrong thing for CR.
diff --git a/tests/torture.at b/tests/torture.at
index 191ab3f..17383b2 100644
--- a/tests/torture.at
+++ b/tests/torture.at
@@ -769,7 +769,9 @@ baz=bla
for j in 0 1 2 3 4 5 6 7; do
for k in 0 1 2 3 4 5 6 7; do
case $i$j$k in #(
- 000) ;; #(
+ 000 | 015 | 377) ;; # MinGW awk dislikes 0xFF, and the test does
+ # the wrong thing for CR on MinGW.
+ #(
*) printf \\$i$j$k's' ;; # The 's' works around a Solaris 8 /bin/bash
bug.
esac
done
- a couple of patches to deal with w32 semantics,
Ralf Wildenhues <=