Don't use diff's -u option. It's not portable.

Besides, with GNU diff one can use the DIFF_OPTIONS envvar.
This commit is contained in:
Jim Meyering 2001-12-04 17:55:08 +00:00
parent 8f730b8a46
commit a95d10ec54
4 changed files with 7 additions and 7 deletions

View File

@ -85,6 +85,6 @@ changed group of `symlink' to G1
EOF
cmp expected actual \
|| { diff -u expected actual 1>&2; fail=1; }
|| { diff expected actual 1>&2; fail=1; }
(exit $fail); exit

View File

@ -35,7 +35,7 @@ fail=0
ls > out || fail=1
cmp out exp || fail=1
test $fail = 1 && diff -u out exp 2> /dev/null
test $fail = 1 && diff out exp 2> /dev/null
cat > exp <<\EOF
.:
@ -54,6 +54,6 @@ EOF
ls -R > out || fail=1
cmp out exp || fail=1
test $fail = 1 && diff -u out exp 2> /dev/null
test $fail = 1 && diff out exp 2> /dev/null
(exit $fail); exit

View File

@ -50,7 +50,7 @@ c:
EOF
cmp out exp || fail=1
test $fail = 1 && diff -u out exp 2> /dev/null
test $fail = 1 && diff out exp 2> /dev/null
rm -rf out exp
ls -R1 x y f > out || fail=1
@ -63,6 +63,6 @@ y:
EOF
cmp out exp || fail=1
test $fail = 1 && diff -u out exp 2> /dev/null
test $fail = 1 && diff out exp 2> /dev/null
(exit $fail); exit

View File

@ -39,7 +39,7 @@ b
c
EOF
cmp out exp || fail=1
test $fail = 1 && diff -u out exp 2> /dev/null
test $fail = 1 && diff out exp 2> /dev/null
rm -rf out exp
ls -1rt a b c > out || fail=1
@ -49,6 +49,6 @@ b
a
EOF
cmp out exp || fail=1
test $fail = 1 && diff -u out exp 2> /dev/null
test $fail = 1 && diff out exp 2> /dev/null
(exit $fail); exit