mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
tests: use compare, not "diff", in a few stray tests
* 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.
This commit is contained in:
1 parent
ad10c145ff
commit
9d98634b39
6 files changed
+6
-6
No files matched your search
@@ -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'
|
||||
|
||||
+1
-1
@@ -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'
|
||||
|
||||
+1
-1
@@ -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
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
@@ -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
|
||||
Reference in new issue
Block a user