examples: beware of portability issues with cmp

As someone wrote nearly 20 years ago in Autoconf's documentation,
don't use cmp to compare text files, but diff.
https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=abad4f0576a7dc361e5385e19c7681449103cdb1
Reported by Jannick.

* examples/test: Use diff, not cmp.
This commit is contained in:
Akim Demaille
2020-05-03 17:44:21 +02:00
parent 292409e91e
commit df752784c2

View File

@@ -115,7 +115,7 @@ run ()
} >eff
if test $sta_eff -eq $sta_exp; then
if cmp eff exp 2>/dev/null; then
if diff eff exp >/dev/null 2>&1; then
echo "$me: PASS: $number"
else
echo "$me: FAIL: $number"