diff options
author | Jim Meyering <meyering@redhat.com> | 2010-11-17 21:35:31 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2010-11-17 21:45:51 +0100 |
commit | 293c37b9061c1afd0acd143bbded637a8f00b3a0 (patch) | |
tree | a7257594a4a6d18c2011f9ea87a86b0f07376bb6 /tests/touch | |
parent | 5c0275e95353742854da6b915fed4fd0434d8159 (diff) | |
download | coreutils-293c37b9061c1afd0acd143bbded637a8f00b3a0.tar.xz |
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/'
Diffstat (limited to 'tests/touch')
-rwxr-xr-x | tests/touch/60-seconds | 2 | ||||
-rwxr-xr-x | tests/touch/dangling-symlink | 2 | ||||
-rwxr-xr-x | tests/touch/dir-1 | 2 | ||||
-rwxr-xr-x | tests/touch/empty-file | 2 | ||||
-rwxr-xr-x | tests/touch/fail-diag | 2 | ||||
-rwxr-xr-x | tests/touch/fifo | 2 | ||||
-rwxr-xr-x | tests/touch/no-create-missing | 2 | ||||
-rwxr-xr-x | tests/touch/no-dereference | 2 | ||||
-rwxr-xr-x | tests/touch/no-rights | 2 | ||||
-rwxr-xr-x | tests/touch/not-owner | 2 | ||||
-rwxr-xr-x | tests/touch/now-owned-by-other | 2 | ||||
-rwxr-xr-x | tests/touch/obsolescent | 2 | ||||
-rwxr-xr-x | tests/touch/read-only | 2 | ||||
-rwxr-xr-x | tests/touch/relative | 2 | ||||
-rwxr-xr-x | tests/touch/trailing-slash | 2 |
15 files changed, 15 insertions, 15 deletions
diff --git a/tests/touch/60-seconds b/tests/touch/60-seconds index e50c25765..9e94d4789 100755 --- a/tests/touch/60-seconds +++ b/tests/touch/60-seconds @@ -17,7 +17,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && touch --version +print_ver_ touch echo 60.000000000 > exp || framework_failure diff --git a/tests/touch/dangling-symlink b/tests/touch/dangling-symlink index 55466c439..a81b4bcdb 100755 --- a/tests/touch/dangling-symlink +++ b/tests/touch/dangling-symlink @@ -18,7 +18,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && touch --version +print_ver_ touch rm -f touch-target t-symlink ln -s touch-target t-symlink diff --git a/tests/touch/dir-1 b/tests/touch/dir-1 index 2d61bb58f..b4c04fe41 100755 --- a/tests/touch/dir-1 +++ b/tests/touch/dir-1 @@ -3,7 +3,7 @@ # This was broken in the 4.0[efg] test releases. . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && touch --version +print_ver_ touch touch . || fail=1 Exit $fail diff --git a/tests/touch/empty-file b/tests/touch/empty-file index e93bf0ac0..e927d4aa9 100755 --- a/tests/touch/empty-file +++ b/tests/touch/empty-file @@ -22,7 +22,7 @@ # the empty file is on an NFS-mounted 4.2 volume. . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && touch --version +print_ver_ touch DEFAULT_SLEEP_SECONDS=2 SLEEP_SECONDS=${SLEEP_SECONDS=$DEFAULT_SLEEP_SECONDS} diff --git a/tests/touch/fail-diag b/tests/touch/fail-diag index a957a8fdb..11f67847f 100755 --- a/tests/touch/fail-diag +++ b/tests/touch/fail-diag @@ -17,7 +17,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && touch --version +print_ver_ touch skip_if_root_ d1=no-$$ diff --git a/tests/touch/fifo b/tests/touch/fifo index e6743d166..bf1f0ab5d 100755 --- a/tests/touch/fifo +++ b/tests/touch/fifo @@ -17,7 +17,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && touch --version +print_ver_ touch mkfifo_or_skip_ fifo diff --git a/tests/touch/no-create-missing b/tests/touch/no-create-missing index 96aa09232..a81560fbb 100755 --- a/tests/touch/no-create-missing +++ b/tests/touch/no-create-missing @@ -17,7 +17,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && touch --version +print_ver_ touch touch -c no-file > /dev/null 2>&1 || fail=1 diff --git a/tests/touch/no-dereference b/tests/touch/no-dereference index 95002e567..ce6623ec1 100755 --- a/tests/touch/no-dereference +++ b/tests/touch/no-dereference @@ -17,7 +17,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && touch --version +print_ver_ touch ln -s nowhere dangling || framework_failure touch file || framework_failure diff --git a/tests/touch/no-rights b/tests/touch/no-rights index d2032550b..c041edbf3 100755 --- a/tests/touch/no-rights +++ b/tests/touch/no-rights @@ -18,7 +18,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && touch --version +print_ver_ touch # Make sure t2 is newer than t1. touch -d '2000-01-01 00:00' t1 || framework_failure diff --git a/tests/touch/not-owner b/tests/touch/not-owner index 9645f4dbd..ea4b54c55 100755 --- a/tests/touch/not-owner +++ b/tests/touch/not-owner @@ -18,7 +18,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && touch --version +print_ver_ touch if env -- test -w /; then skip_test_ you have write access to /. diff --git a/tests/touch/now-owned-by-other b/tests/touch/now-owned-by-other index c7215022c..c475903a2 100755 --- a/tests/touch/now-owned-by-other +++ b/tests/touch/now-owned-by-other @@ -17,7 +17,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && touch --version +print_ver_ touch require_root_ group_num=$(id -g $NON_ROOT_USERNAME) diff --git a/tests/touch/obsolescent b/tests/touch/obsolescent index 9821fc1e4..20c398dae 100755 --- a/tests/touch/obsolescent +++ b/tests/touch/obsolescent @@ -17,7 +17,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && touch --version +print_ver_ touch _POSIX2_VERSION=199209; export _POSIX2_VERSION POSIXLY_CORRECT=1; export POSIXLY_CORRECT diff --git a/tests/touch/read-only b/tests/touch/read-only index 265f2880b..c65055dea 100755 --- a/tests/touch/read-only +++ b/tests/touch/read-only @@ -17,7 +17,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && touch --version +print_ver_ touch skip_if_root_ : > read-only || framework_failure diff --git a/tests/touch/relative b/tests/touch/relative index 7e56a305a..0c5e36782 100755 --- a/tests/touch/relative +++ b/tests/touch/relative @@ -18,7 +18,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && touch --version +print_ver_ touch TZ=UTC0 touch --date='2004-01-16 12:00 +0000' f || framework_failure diff --git a/tests/touch/trailing-slash b/tests/touch/trailing-slash index 97b910018..cc5e7c62e 100755 --- a/tests/touch/trailing-slash +++ b/tests/touch/trailing-slash @@ -17,7 +17,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && touch --version +print_ver_ touch ln -s nowhere dangling || framework_failure ln -s loop loop || framework_failure |