From 293c37b9061c1afd0acd143bbded637a8f00b3a0 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 17 Nov 2010 21:35:31 +0100 Subject: tests: substitute the single-program $VERBOSE/--version uses Automatically make all of the changes like this: -test "$VERBOSE" = yes && chgrp --version +print_ver_ chgrp git grep -l 'VERBOSE.*--version'|xargs perl -pi -e \ 's/test "\$VERBOSE" = yes && (\w+) --version/print_ver_ $1/' --- tests/mkdir/p-1 | 2 +- tests/mkdir/p-2 | 2 +- tests/mkdir/p-3 | 2 +- tests/mkdir/p-slashdot | 2 +- tests/mkdir/p-thru-slink | 2 +- tests/mkdir/p-v | 2 +- tests/mkdir/parents | 2 +- tests/mkdir/perm | 2 +- tests/mkdir/special-1 | 2 +- tests/mkdir/t-slash | 2 +- tests/mkdir/writable-under-readonly | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) (limited to 'tests/mkdir') diff --git a/tests/mkdir/p-1 b/tests/mkdir/p-1 index 9c8e8a5d8..060c05af8 100755 --- a/tests/mkdir/p-1 +++ b/tests/mkdir/p-1 @@ -17,7 +17,7 @@ # along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && mkdir --version +print_ver_ mkdir mkdir --parents "`pwd`/t" || fail=1 test -d t || fail=1 diff --git a/tests/mkdir/p-2 b/tests/mkdir/p-2 index 735d7ad08..38c0adf56 100755 --- a/tests/mkdir/p-2 +++ b/tests/mkdir/p-2 @@ -17,7 +17,7 @@ # along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && mkdir --version +print_ver_ mkdir mkdir --parents "`pwd`/t/u" || fail=1 test -d t/u || fail=1 diff --git a/tests/mkdir/p-3 b/tests/mkdir/p-3 index ddc812e0e..bcfcf9552 100755 --- a/tests/mkdir/p-3 +++ b/tests/mkdir/p-3 @@ -19,7 +19,7 @@ # along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && mkdir --version +print_ver_ mkdir skip_if_root_ mkdir no-access || framework_failure diff --git a/tests/mkdir/p-slashdot b/tests/mkdir/p-slashdot index fba112df2..6f3d3542d 100755 --- a/tests/mkdir/p-slashdot +++ b/tests/mkdir/p-slashdot @@ -17,7 +17,7 @@ # along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && mkdir --version +print_ver_ mkdir mkdir -p d1/. || fail=1 diff --git a/tests/mkdir/p-thru-slink b/tests/mkdir/p-thru-slink index e2cc9c93f..feb073837 100755 --- a/tests/mkdir/p-thru-slink +++ b/tests/mkdir/p-thru-slink @@ -17,7 +17,7 @@ # along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && mkdir --version +print_ver_ mkdir ln -s . slink || framework_failure diff --git a/tests/mkdir/p-v b/tests/mkdir/p-v index aeae33da9..d4a553669 100755 --- a/tests/mkdir/p-v +++ b/tests/mkdir/p-v @@ -17,7 +17,7 @@ # along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && mkdir --version +print_ver_ mkdir mkdir -pv foo/a/b/c/d >out || fail=1 diff --git a/tests/mkdir/parents b/tests/mkdir/parents index 951b6f9e0..56e106d44 100755 --- a/tests/mkdir/parents +++ b/tests/mkdir/parents @@ -17,7 +17,7 @@ # along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && mkdir --version +print_ver_ mkdir skip_if_setgid_ mkdir -m 700 e-dir || framework_failure diff --git a/tests/mkdir/perm b/tests/mkdir/perm index 0cd0a5581..878e46509 100755 --- a/tests/mkdir/perm +++ b/tests/mkdir/perm @@ -18,7 +18,7 @@ # along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && mkdir --version +print_ver_ mkdir skip_if_setgid_ working_umask_or_skip_ diff --git a/tests/mkdir/special-1 b/tests/mkdir/special-1 index 7ed437021..cea2081ac 100755 --- a/tests/mkdir/special-1 +++ b/tests/mkdir/special-1 @@ -17,7 +17,7 @@ # along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && mkdir --version +print_ver_ mkdir set_mode_string=u=rwx,g=rx,o=w,-s,+t output_mode_string=drwxr-x-wT diff --git a/tests/mkdir/t-slash b/tests/mkdir/t-slash index ed72880c7..d23c89b7c 100755 --- a/tests/mkdir/t-slash +++ b/tests/mkdir/t-slash @@ -18,7 +18,7 @@ # along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && mkdir --version +print_ver_ mkdir mkdir -p dir/ || fail=1 diff --git a/tests/mkdir/writable-under-readonly b/tests/mkdir/writable-under-readonly index 2c8ac52f4..85de287a3 100755 --- a/tests/mkdir/writable-under-readonly +++ b/tests/mkdir/writable-under-readonly @@ -25,7 +25,7 @@ # Demonstrate the problem, as root: . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && mkdir --version +print_ver_ mkdir require_root_ # FIXME: for now, skip it unconditionally -- cgit v1.2.3-70-g09d2