From 9d98634b3908786bb048b72624da244e681f87b9 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 22 Nov 2011 10:18:30 +0100 Subject: [PATCH] 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. --- tests/install/basic-1 | 2 +- tests/mkdir/p-v | 2 +- tests/mv/part-fail | 2 +- tests/rm/rm1 | 2 +- tests/rm/rm2 | 2 +- tests/touch/not-owner | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/install/basic-1 b/tests/install/basic-1 index 9863bec..ec6449c 100755 --- a/tests/install/basic-1 +++ b/tests/install/basic-1 @@ -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' diff --git a/tests/mkdir/p-v b/tests/mkdir/p-v index e2e7f54..afee93b 100755 --- a/tests/mkdir/p-v +++ b/tests/mkdir/p-v @@ -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' diff --git a/tests/mv/part-fail b/tests/mv/part-fail index 8d25669..c653df8 100755 --- a/tests/mv/part-fail +++ b/tests/mv/part-fail @@ -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 diff --git a/tests/rm/rm1 b/tests/rm/rm1 index ce0d871..f4f43d0 100755 --- a/tests/rm/rm1 +++ b/tests/rm/rm1 @@ -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 diff --git a/tests/rm/rm2 b/tests/rm/rm2 index 0cd0892..6df1e20 100755 --- a/tests/rm/rm2 +++ b/tests/rm/rm2 @@ -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 diff --git a/tests/touch/not-owner b/tests/touch/not-owner index 1166c16..98dd4e3 100755 --- a/tests/touch/not-owner +++ b/tests/touch/not-owner @@ -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 -- 2.7.4