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/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
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
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
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