summaryrefslogtreecommitdiff
path: root/tests/mv
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-09-29 10:17:51 +0000
committerJim Meyering <jim@meyering.net>2000-09-29 10:17:51 +0000
commit6a8e993550d43e4e481c7e5c4094a13bf5cd1810 (patch)
treed21a5acbe0701c4a3825de926f9ba174b84709db /tests/mv
parent087520e781bed394e93bc8bf285be7a8518ed4ea (diff)
downloadcoreutils-6a8e993550d43e4e481c7e5c4094a13bf5cd1810.tar.xz
Run `diff -c' only if cmp finds a difference.
Clean up.
Diffstat (limited to 'tests/mv')
-rwxr-xr-xtests/mv/part-symlink11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/mv/part-symlink b/tests/mv/part-symlink
index ef41e6e52..3cd4e9af0 100755
--- a/tests/mv/part-symlink
+++ b/tests/mv/part-symlink
@@ -150,7 +150,7 @@ for copy in cp mv; do
done
test $fail = 1 &&
- { (exit $?); exit; }
+ { (exit 1); exit; }
cat <<\EOF > $expected
1 cp loc_reg rem_sl [cp: `loc_reg' and `rem_sl' are the same file ](loc_reg) (rem_sl -> dir/loc_reg)
@@ -199,9 +199,8 @@ cat <<\EOF > $expected
EOF
-# Uncomment this if you see a failure and want to try to diagnose it.
-#diff -u $expected $actual 1>&2
+# Some folks may don't have diff.
+cmp $expected $actual \
+ || { diff -c $expected $actual 1>&2; fail=1; }
-cmp $expected $actual
-
-(exit $?); exit
+(exit $fail); exit