From ff7f0ff85c40174f1885ec61fa4ab6b73d02b555 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 14 Nov 2010 12:02:39 +0100 Subject: tests: convert 'if test "$VERBOSE" = yes; then' to test ... && --- tests/mv/acl | 9 ++------- tests/mv/childproof | 9 ++------- tests/mv/diag | 7 +------ tests/mv/dup-source | 9 ++------- tests/mv/hard-2 | 8 ++------ tests/mv/i-2 | 11 ++--------- tests/mv/part-symlink | 8 ++------ tests/mv/update | 7 +------ 8 files changed, 14 insertions(+), 54 deletions(-) (limited to 'tests/mv') diff --git a/tests/mv/acl b/tests/mv/acl index 16d7692f5..c67630ed0 100755 --- a/tests/mv/acl +++ b/tests/mv/acl @@ -17,14 +17,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if test "$VERBOSE" = yes; then - set -x - mv --version - getfacl --version - setfacl --version -fi - . $srcdir/test-lib.sh +test "$VERBOSE" = yes && { mv --version; getfacl --version; setfacl --version; } + require_acl_ # Skip this test if cp was built without ACL support: diff --git a/tests/mv/childproof b/tests/mv/childproof index 057ce91d4..2e5e4611c 100755 --- a/tests/mv/childproof +++ b/tests/mv/childproof @@ -18,14 +18,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if test "$VERBOSE" = yes; then - set -x - cp --version - mv --version - ln --version -fi - . $srcdir/test-lib.sh +test "$VERBOSE" = yes && { cp --version; mv --version; ln --version; } + skip_if_root_ mkdir a b c || framework_failure diff --git a/tests/mv/diag b/tests/mv/diag index 1a23b5333..f40fc7c42 100755 --- a/tests/mv/diag +++ b/tests/mv/diag @@ -16,13 +16,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if test "$VERBOSE" = yes; then - set -x - mv --version -fi - -# Make sure we get English translations. . $srcdir/test-lib.sh +test "$VERBOSE" = yes && mv --version touch f1 || framework_failure touch f2 || framework_failure diff --git a/tests/mv/dup-source b/tests/mv/dup-source index ad947b4b5..9ede87ef6 100755 --- a/tests/mv/dup-source +++ b/tests/mv/dup-source @@ -19,15 +19,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if test "$VERBOSE" = yes; then - set -x - cp --version - mv --version -fi - . $srcdir/test-lib.sh -skip_if_root_ +test "$VERBOSE" = yes && { cp --version; mv --version; } +skip_if_root_ for i in cp; do diff --git a/tests/mv/hard-2 b/tests/mv/hard-2 index 1ae0a34ef..704e2679d 100755 --- a/tests/mv/hard-2 +++ b/tests/mv/hard-2 @@ -17,13 +17,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if test "$VERBOSE" = yes; then - set -x - mv --version - cp --version -fi - . $srcdir/test-lib.sh +test "$VERBOSE" = yes && { cp --version; mv --version; } + skip_if_root_ mkdir dst || framework_failure diff --git a/tests/mv/i-2 b/tests/mv/i-2 index aed1c9eee..83596426e 100755 --- a/tests/mv/i-2 +++ b/tests/mv/i-2 @@ -17,16 +17,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if test "$VERBOSE" = yes; then - set -x - mv --version - cp --version -fi - - -# Make sure we get English translations. - . $srcdir/test-lib.sh +test "$VERBOSE" = yes && { cp --version; mv --version; } + skip_if_root_ for i in a b c d e f g h; do diff --git a/tests/mv/part-symlink b/tests/mv/part-symlink index 3b8e442ef..bf2fd451a 100755 --- a/tests/mv/part-symlink +++ b/tests/mv/part-symlink @@ -17,13 +17,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if test "$VERBOSE" = yes; then - set -x - mv --version - cp --version -fi - . $srcdir/test-lib.sh +test "$VERBOSE" = yes && { cp --version; mv --version; } + cleanup_() { rm -rf "$other_partition_tmpdir"; } . "$abs_srcdir/other-fs-tmpdir" diff --git a/tests/mv/update b/tests/mv/update index a8035922e..b0a532c63 100755 --- a/tests/mv/update +++ b/tests/mv/update @@ -16,13 +16,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if test "$VERBOSE" = yes; then - set -x - cp --version - mv --version -fi - . $srcdir/test-lib.sh +test "$VERBOSE" = yes && { cp --version; mv --version; } echo old > old || framework_failure touch -d yesterday old || framework_failure -- cgit v1.2.3-54-g00ecf