]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: use compare, not "diff", in a few stray tests
authorJim Meyering <meyering@redhat.com>
Tue, 22 Nov 2011 09:18:30 +0000 (10:18 +0100)
committerJim Meyering <meyering@redhat.com>
Tue, 22 Nov 2011 09:34:43 +0000 (10:34 +0100)
* tests/install/basic-1: Use compare, not diff.
* tests/mkdir/p-v: Likewise.
* tests/mv/part-fail: Likewise.
* tests/rm/rm1: Likewise.
* tests/rm/rm2: Likewise.
* tests/touch/not-owner: Likewise.

tests/install/basic-1
tests/mkdir/p-v
tests/mv/part-fail
tests/rm/rm1
tests/rm/rm2
tests/touch/not-owner

index 9863becf958fd55fcf6c839afd1a1a11a6209998..ec6449cbdb35be8eb504aa08b5a3a675b2da10bb 100755 (executable)
@@ -104,7 +104,7 @@ fi
 
 touch file || fail=1
 ginstall -Dv file sub3/a/b/c/file >out 2>&1 || fail=1
-diff - out <<\EOF || fail=1
+compare - out <<\EOF || fail=1
 ginstall: creating directory `sub3'
 ginstall: creating directory `sub3/a'
 ginstall: creating directory `sub3/a/b'
index e2e7f54a13d3be9f0fbecd0df35f082be107e2f5..afee93bcd80210698cf5b79ec47f8d9fbd8207a9 100755 (executable)
@@ -21,7 +21,7 @@ print_ver_ mkdir
 
 mkdir -pv foo/a/b/c/d >out || fail=1
 
-diff - out <<\EOF
+compare - out <<\EOF
 mkdir: created directory `foo'
 mkdir: created directory `foo/a'
 mkdir: created directory `foo/a/b'
index 8d2566964ae6fcd3e717c67be0ddbcdb1f5499c6..c653df8233d233e0446bbcebc5311d575166b177 100755 (executable)
@@ -50,6 +50,6 @@ else
     fail=1
   fi
 fi
-test $fail = 1 && diff out exp 2> /dev/null
+test $fail = 1 && compare out exp
 
 Exit $fail
index ce0d8715037c4a7b6d18bead41ba9f1b2c8aa224..f4f43d042f449d69ececcda977dc1dff463c7224 100755 (executable)
@@ -39,7 +39,7 @@ EOF
 cmp out exp > /dev/null 2>&1 || {
   cmp out exp2 || fail=1
   }
-test $fail = 1 && diff out exp 2> /dev/null
+test $fail = 1 && compare out exp
 
 test -d b/a/p || fail=1
 test -d b/c && fail=1
index 0cd089291730f0410b8dc40be85b40e148045c5b..6df1e2090abf802301ac0a5bbceeadb0076fc40e 100755 (executable)
@@ -42,7 +42,7 @@ EOF
 
 cmp out exp > /dev/null 2>&1 \
     || { cmp out exp-solaris > /dev/null 2>&1 || fail=1; }
-test $fail = 1 && diff out exp 2> /dev/null
+test $fail = 1 && compare out exp
 
 test -d a/0 && fail=1
 test -d a/1 || fail=1
index 1166c16084ec5456fbb0086f84e2277302718eab..98dd4e34845c8c3bf8aa91a35e543632f836a061 100755 (executable)
@@ -50,6 +50,6 @@ EOF
 done
 test "$match" = 1 || fail=1
 
-test $fail = 1 && diff out exp 2> /dev/null
+test $fail = 1 && compare out exp
 
 Exit $fail