]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* tests/atgeneral.m4 (at_diff): Don't use `cmp -s', on DOS it
authorAkim Demaille <akim@epita.fr>
Fri, 18 Feb 2000 10:01:25 +0000 (10:01 +0000)
committerAkim Demaille <akim@epita.fr>
Fri, 18 Feb 2000 10:01:25 +0000 (10:01 +0000)
makes the difference between Unix and DOS EOL. `diff' does not.
Reported by Eli Zaretski.
Also, be ready to use a diff that does not support `-u'.

ChangeLog
THANKS
lib/autotest/general.m4
tests/atgeneral.m4

index 56d613e4b52290d40b6d2bd7fa6df3205c0b21be..83f96c8fbbcdf5cd8687650f28cda28f9ea2c61b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2000-02-18  Akim Demaille  <akim@epita.fr>
+
+       * tests/atgeneral.m4 (at_diff): Don't use `cmp -s', on DOS it
+       makes the difference between Unix and DOS EOL. `diff' does not.
+       Reported by Eli Zaretski.
+       Also, be ready to use a diff that does not support `-u'.
+
 2000-02-18  Akim Demaille  <akim@epita.fr>
 
        * tests/tools.m4 (Syntax of the scripts): Be robust to shells that
diff --git a/THANKS b/THANKS
index 4026417513b565c019e804d49efd170602f22e54..6c4ee42bb9ee0d5df096370a3a897010f3d57b6b 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -15,6 +15,7 @@ Christian Krone               krischan@sql.de
 Dave Adams             adams@hpesdwa.fc.hp.com
 Didier Verna           verna@inf.enst.fr
 Doug Evans             dje@canuck.cygnus.com
+Eli Zaretskii          eliz@gnu.org
 Erez Zadok             ezk@cs.columbia.edu
 Eric Mumpower          nocturne@mit.edu
 Felix Lee              flee@cygnus.com
index e828a297350b9e5cb0a1167dfca56a7022c0fd08..ce6c6cf159521f612322257bd3ce0b74564513f6 100644 (file)
@@ -131,17 +131,24 @@ while test [$][#] -gt 0; do
   esac
 done
 
-# In the testing suite, we only want to know if the test succeeded or failed.
-# But in debugging scripts, we want more information, so we prefer `diff -u'
-# to the silent `cmp', even if it may happen that we compare binary files.
-# Option `-u' might be less portable, so either change it or use GNU `diff'.
 
-if test -n "$at_verbose"; then
+# To check whether a test succeeded or not, we compare an expected
+# output with a reference.  In the testing suite, we just need `cmp'
+# but in debugging scripts, we want more information, so we prefer
+# `diff -u'.  Nonetheless we will use `diff' only, because in DOS
+# environments, `diff' considers that two files are equal included
+# when there are only differences on the coding of new lines. `cmp'
+# does not.
+# Finally, not all the `diff' support `-u'.
+
+if diff -u /dev/null /dev/null >/dev/null 2>&1; then
   at_diff='diff -u'
 else
-  at_diff='cmp -s'
+  at_diff='diff'
 fi
 
+
+
 # Each generated debugging script, containing a single test group, cleans
 # up files at the beginning only, not at the end.  This is so we can repeat
 # the script many times and browse left over files.  To cope with such left
index e828a297350b9e5cb0a1167dfca56a7022c0fd08..ce6c6cf159521f612322257bd3ce0b74564513f6 100644 (file)
@@ -131,17 +131,24 @@ while test [$][#] -gt 0; do
   esac
 done
 
-# In the testing suite, we only want to know if the test succeeded or failed.
-# But in debugging scripts, we want more information, so we prefer `diff -u'
-# to the silent `cmp', even if it may happen that we compare binary files.
-# Option `-u' might be less portable, so either change it or use GNU `diff'.
 
-if test -n "$at_verbose"; then
+# To check whether a test succeeded or not, we compare an expected
+# output with a reference.  In the testing suite, we just need `cmp'
+# but in debugging scripts, we want more information, so we prefer
+# `diff -u'.  Nonetheless we will use `diff' only, because in DOS
+# environments, `diff' considers that two files are equal included
+# when there are only differences on the coding of new lines. `cmp'
+# does not.
+# Finally, not all the `diff' support `-u'.
+
+if diff -u /dev/null /dev/null >/dev/null 2>&1; then
   at_diff='diff -u'
 else
-  at_diff='cmp -s'
+  at_diff='diff'
 fi
 
+
+
 # Each generated debugging script, containing a single test group, cleans
 # up files at the beginning only, not at the end.  This is so we can repeat
 # the script many times and browse left over files.  To cope with such left