mirror of
https://github.com/coreutils/coreutils.git
synced 2024-12-03 06:53:31 +08:00
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:
parent
8f730b8a46
commit
a95d10ec54
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user