summaryrefslogtreecommitdiff
path: root/tests/rm
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-11-17 21:35:31 +0100
committerJim Meyering <meyering@redhat.com>2010-11-17 21:45:51 +0100
commit293c37b9061c1afd0acd143bbded637a8f00b3a0 (patch)
treea7257594a4a6d18c2011f9ea87a86b0f07376bb6 /tests/rm
parent5c0275e95353742854da6b915fed4fd0434d8159 (diff)
downloadcoreutils-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/rm')
-rwxr-xr-xtests/rm/cycle2
-rwxr-xr-xtests/rm/dangling-symlink2
-rwxr-xr-xtests/rm/deep-12
-rwxr-xr-xtests/rm/deep-22
-rwxr-xr-xtests/rm/dir-no-w2
-rwxr-xr-xtests/rm/dir-nonrecur2
-rwxr-xr-xtests/rm/dot-rel2
-rwxr-xr-xtests/rm/empty-inacc2
-rwxr-xr-xtests/rm/ext3-perf2
-rwxr-xr-xtests/rm/f-12
-rwxr-xr-xtests/rm/fail-2eperm2
-rwxr-xr-xtests/rm/fail-eacces2
-rwxr-xr-xtests/rm/hash2
-rwxr-xr-xtests/rm/i-12
-rwxr-xr-xtests/rm/i-never2
-rwxr-xr-xtests/rm/i-no-r2
-rwxr-xr-xtests/rm/ignorable2
-rwxr-xr-xtests/rm/inaccessible2
-rwxr-xr-xtests/rm/interactive-always2
-rwxr-xr-xtests/rm/interactive-once2
-rwxr-xr-xtests/rm/ir-12
-rwxr-xr-xtests/rm/isatty2
-rwxr-xr-xtests/rm/no-give-up2
-rwxr-xr-xtests/rm/one-file-system2
-rwxr-xr-xtests/rm/one-file-system22
-rwxr-xr-xtests/rm/r-12
-rwxr-xr-xtests/rm/r-22
-rwxr-xr-xtests/rm/r-32
-rwxr-xr-xtests/rm/r-42
-rwxr-xr-xtests/rm/read-only2
-rwxr-xr-xtests/rm/readdir-bug2
-rwxr-xr-xtests/rm/rm12
-rwxr-xr-xtests/rm/rm22
-rwxr-xr-xtests/rm/rm32
-rwxr-xr-xtests/rm/rm42
-rwxr-xr-xtests/rm/rm52
-rwxr-xr-xtests/rm/sunos-12
-rwxr-xr-xtests/rm/unread22
-rwxr-xr-xtests/rm/unread32
-rwxr-xr-xtests/rm/v-slash2
40 files changed, 40 insertions, 40 deletions
diff --git a/tests/rm/cycle b/tests/rm/cycle
index 4af7afee3..709969a25 100755
--- a/tests/rm/cycle
+++ b/tests/rm/cycle
@@ -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 && rm --version
+print_ver_ rm
skip_if_root_
mkdir -p a/b
diff --git a/tests/rm/dangling-symlink b/tests/rm/dangling-symlink
index b082901a6..13dfea870 100755
--- a/tests/rm/dangling-symlink
+++ b/tests/rm/dangling-symlink
@@ -20,7 +20,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. "${srcdir=.}/init.sh"; path_prepend_ ../src
-test "$VERBOSE" = yes && rm --version
+print_ver_ rm
ln -s no-file dangle
ln -s / symlink
diff --git a/tests/rm/deep-1 b/tests/rm/deep-1
index b21e1e603..8ce291c77 100755
--- a/tests/rm/deep-1
+++ b/tests/rm/deep-1
@@ -24,7 +24,7 @@
# If this test takes too long on your system, blame the OS.
. "${srcdir=.}/init.sh"; path_prepend_ ../src
-test "$VERBOSE" = yes && rm --version
+print_ver_ rm
umask 022
diff --git a/tests/rm/deep-2 b/tests/rm/deep-2
index c90f60730..4e1b27b48 100755
--- a/tests/rm/deep-2
+++ b/tests/rm/deep-2
@@ -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 && rm --version
+print_ver_ rm
# Root can run this test, but it always succeeds, since for root, all
# files are writable, and write_protected_non_symlink never reaches
diff --git a/tests/rm/dir-no-w b/tests/rm/dir-no-w
index 8dc19d4fa..ae38062bc 100755
--- a/tests/rm/dir-no-w
+++ b/tests/rm/dir-no-w
@@ -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 && rm --version
+print_ver_ rm
mkdir --mode=0500 unwritable-dir || framework_failure
diff --git a/tests/rm/dir-nonrecur b/tests/rm/dir-nonrecur
index 816b72d18..3ed2d0ab2 100755
--- a/tests/rm/dir-nonrecur
+++ b/tests/rm/dir-nonrecur
@@ -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 && rm --version
+print_ver_ rm
mkdir d || framework_failure
diff --git a/tests/rm/dot-rel b/tests/rm/dot-rel
index 81d405a72..910ed507f 100755
--- a/tests/rm/dot-rel
+++ b/tests/rm/dot-rel
@@ -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 && rm --version
+print_ver_ rm
mkdir a b || framework_failure
touch a/f b/f || framework_failure
diff --git a/tests/rm/empty-inacc b/tests/rm/empty-inacc
index 3aef6abaa..573fd24fe 100755
--- a/tests/rm/empty-inacc
+++ b/tests/rm/empty-inacc
@@ -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 && rm --version
+print_ver_ rm
skip_if_root_
mkdir -m0 inacc || framework_failure
diff --git a/tests/rm/ext3-perf b/tests/rm/ext3-perf
index 155de1828..3fa4e912f 100755
--- a/tests/rm/ext3-perf
+++ b/tests/rm/ext3-perf
@@ -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 && rm --version
+print_ver_ rm
very_expensive_
diff --git a/tests/rm/f-1 b/tests/rm/f-1
index 6400d5b84..4511cbea6 100755
--- a/tests/rm/f-1
+++ b/tests/rm/f-1
@@ -19,7 +19,7 @@
test=f-1
. "${srcdir=.}/init.sh"; path_prepend_ ../src
-test "$VERBOSE" = yes && rm --version
+print_ver_ rm
mkdir -p d || framework_failure
diff --git a/tests/rm/fail-2eperm b/tests/rm/fail-2eperm
index 0085d1f48..416c97e98 100755
--- a/tests/rm/fail-2eperm
+++ b/tests/rm/fail-2eperm
@@ -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 && rm --version
+print_ver_ rm
require_root_
# The containing directory must be owned by the user who eventually runs rm.
diff --git a/tests/rm/fail-eacces b/tests/rm/fail-eacces
index fc20bd69e..3010a007b 100755
--- a/tests/rm/fail-eacces
+++ b/tests/rm/fail-eacces
@@ -20,7 +20,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. "${srcdir=.}/init.sh"; path_prepend_ ../src
-test "$VERBOSE" = yes && rm --version
+print_ver_ rm
skip_if_root_
ok=0
diff --git a/tests/rm/hash b/tests/rm/hash
index 8a4d66154..fafafdcfe 100755
--- a/tests/rm/hash
+++ b/tests/rm/hash
@@ -19,7 +19,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. "${srcdir=.}/init.sh"; path_prepend_ ../src
-test "$VERBOSE" = yes && rm --version
+print_ver_ rm
expensive_
# Create a hierarchy with 3*26 leaf directories, each at depth 153.
diff --git a/tests/rm/i-1 b/tests/rm/i-1
index 20e88e875..fdcbecbdc 100755
--- a/tests/rm/i-1
+++ b/tests/rm/i-1
@@ -19,7 +19,7 @@
test=i-1
. "${srcdir=.}/init.sh"; path_prepend_ ../src
-test "$VERBOSE" = yes && rm --version
+print_ver_ rm
t=t
mkdir -p $t || framework_failure
diff --git a/tests/rm/i-never b/tests/rm/i-never
index b00d3ef1b..1c9fe8470 100755
--- a/tests/rm/i-never
+++ b/tests/rm/i-never
@@ -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 && rm --version
+print_ver_ rm
skip_if_root_
touch f || framework_failure
diff --git a/tests/rm/i-no-r b/tests/rm/i-no-r
index 3178a9843..896949da6 100755
--- a/tests/rm/i-no-r
+++ b/tests/rm/i-no-r
@@ -19,7 +19,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. "${srcdir=.}/init.sh"; path_prepend_ ../src
-test "$VERBOSE" = yes && rm --version
+print_ver_ rm
mkdir dir || framework_failure
echo y > y || framework_failure
diff --git a/tests/rm/ignorable b/tests/rm/ignorable
index 9028de8dc..00fc24f0a 100755
--- a/tests/rm/ignorable
+++ b/tests/rm/ignorable
@@ -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 && rm --version
+print_ver_ rm
skip_if_root_
touch existing-non-dir || framework_failure
diff --git a/tests/rm/inaccessible b/tests/rm/inaccessible
index 6e09de67a..bdc1d443f 100755
--- a/tests/rm/inaccessible
+++ b/tests/rm/inaccessible
@@ -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 && rm --version
+print_ver_ rm
# Skip this test if your system has neither the openat-style functions
# nor /proc/self/fd support with which to emulate them.
diff --git a/tests/rm/interactive-always b/tests/rm/interactive-always
index 9e15e2258..7a1297046 100755
--- a/tests/rm/interactive-always
+++ b/tests/rm/interactive-always
@@ -19,7 +19,7 @@
test=interactive-always
. "${srcdir=.}/init.sh"; path_prepend_ ../src
-test "$VERBOSE" = yes && rm --version
+print_ver_ rm
touch file1-1 file1-2 file2-1 file2-2 file3-1 file3-2 file4-1 file4-2 \
|| framework_failure
diff --git a/tests/rm/interactive-once b/tests/rm/interactive-once
index 48086d704..facef7c79 100755
--- a/tests/rm/interactive-once
+++ b/tests/rm/interactive-once
@@ -19,7 +19,7 @@
test=interactive-once
. "${srcdir=.}/init.sh"; path_prepend_ ../src
-test "$VERBOSE" = yes && rm --version
+print_ver_ rm
mkdir -p dir1-1 dir2-1 dir2-2 || framework_failure
touch file1-1 file2-1 file2-2 file2-3 file3-1 file3-2 file3-3 file3-4 \
diff --git a/tests/rm/ir-1 b/tests/rm/ir-1
index b48fa948b..51cacad21 100755
--- a/tests/rm/ir-1
+++ b/tests/rm/ir-1
@@ -19,7 +19,7 @@
test=ir-1
. "${srcdir=.}/init.sh"; path_prepend_ ../src
-test "$VERBOSE" = yes && rm --version
+print_ver_ rm
t=t
mkdir -p $t $t/a $t/b $t/c || framework_failure
diff --git a/tests/rm/isatty b/tests/rm/isatty
index 1b18654cb..a6e533537 100755
--- a/tests/rm/isatty
+++ b/tests/rm/isatty
@@ -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 && rm --version
+print_ver_ rm
skip_if_root_
diff --git a/tests/rm/no-give-up b/tests/rm/no-give-up
index e85196ce7..70a9ee381 100755
--- a/tests/rm/no-give-up
+++ b/tests/rm/no-give-up
@@ -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 && rm --version
+print_ver_ rm
require_root_
mkdir d || framework_failure
diff --git a/tests/rm/one-file-system b/tests/rm/one-file-system
index 371607be6..a8cae48ac 100755
--- a/tests/rm/one-file-system
+++ b/tests/rm/one-file-system
@@ -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 && rm --version
+print_ver_ rm
require_root_
cleanup_()
diff --git a/tests/rm/one-file-system2 b/tests/rm/one-file-system2
index 83a9cecee..279c3115e 100755
--- a/tests/rm/one-file-system2
+++ b/tests/rm/one-file-system2
@@ -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 && rm --version
+print_ver_ rm
mkdir -p a/b
diff --git a/tests/rm/r-1 b/tests/rm/r-1
index e07881b0e..fb9eab221 100755
--- a/tests/rm/r-1
+++ b/tests/rm/r-1
@@ -20,7 +20,7 @@
test=r-1
. "${srcdir=.}/init.sh"; path_prepend_ ../src
-test "$VERBOSE" = yes && rm --version
+print_ver_ rm
mkdir a a/a || framework_failure
> b || framework_failure
diff --git a/tests/rm/r-2 b/tests/rm/r-2
index 485620fe4..91a12096e 100755
--- a/tests/rm/r-2
+++ b/tests/rm/r-2
@@ -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 && rm --version
+print_ver_ rm
mkdir t t/a t/a/b || framework_failure
> t/a/f || framework_failure
diff --git a/tests/rm/r-3 b/tests/rm/r-3
index 829685055..c00529cf1 100755
--- a/tests/rm/r-3
+++ b/tests/rm/r-3
@@ -24,7 +24,7 @@
# are 338 or more files in a directory on a Darwin-6.5 system
. "${srcdir=.}/init.sh"; path_prepend_ ../src
-test "$VERBOSE" = yes && rm --version
+print_ver_ rm
mkdir t || framework_failure
cd t || framework_failure
diff --git a/tests/rm/r-4 b/tests/rm/r-4
index c8d3f9bc7..e7bb9a832 100755
--- a/tests/rm/r-4
+++ b/tests/rm/r-4
@@ -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 && rm --version
+print_ver_ rm
mkdir d || framework_failure
touch d/a || framework_failure
diff --git a/tests/rm/read-only b/tests/rm/read-only
index c54259469..4cbd54860 100755
--- a/tests/rm/read-only
+++ b/tests/rm/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 && rm --version
+print_ver_ rm
require_root_
cwd=`pwd`
diff --git a/tests/rm/readdir-bug b/tests/rm/readdir-bug
index be3e546c0..2c813b9e1 100755
--- a/tests/rm/readdir-bug
+++ b/tests/rm/readdir-bug
@@ -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 && rm --version
+print_ver_ rm
# Create a directory containing many files.
# What counts is a combination of the number of files and
diff --git a/tests/rm/rm1 b/tests/rm/rm1
index 46ae76971..23456d053 100755
--- a/tests/rm/rm1
+++ b/tests/rm/rm1
@@ -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 && rm --version
+print_ver_ rm
skip_if_root_
mkdir -p b/a/p b/c b/d || framework_failure
diff --git a/tests/rm/rm2 b/tests/rm/rm2
index 11b153fee..32aaf8c30 100755
--- a/tests/rm/rm2
+++ b/tests/rm/rm2
@@ -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 && rm --version
+print_ver_ rm
skip_if_root_
mkdir -p a/0 || framework_failure
diff --git a/tests/rm/rm3 b/tests/rm/rm3
index b62dec603..1c3f2b9b2 100755
--- a/tests/rm/rm3
+++ b/tests/rm/rm3
@@ -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 && rm --version
+print_ver_ rm
skip_if_root_
mkdir -p z || framework_failure
diff --git a/tests/rm/rm4 b/tests/rm/rm4
index 571fdb019..f9f4e8fd3 100755
--- a/tests/rm/rm4
+++ b/tests/rm/rm4
@@ -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 && rm --version
+print_ver_ rm
skip_if_root_
mkdir dir || framework_failure
diff --git a/tests/rm/rm5 b/tests/rm/rm5
index 1d27f7cda..a6f6fc424 100755
--- a/tests/rm/rm5
+++ b/tests/rm/rm5
@@ -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 && rm --version
+print_ver_ rm
skip_if_root_
mkdir -p d/e || framework_failure
diff --git a/tests/rm/sunos-1 b/tests/rm/sunos-1
index 3057ecbbd..846ca20c6 100755
--- a/tests/rm/sunos-1
+++ b/tests/rm/sunos-1
@@ -23,7 +23,7 @@
# but relative to `/' rather than relative to the current directory.
. "${srcdir=.}/init.sh"; path_prepend_ ../src
-test "$VERBOSE" = yes && rm --version
+print_ver_ rm
rm -r '' > /dev/null 2>&1 && fail=1
diff --git a/tests/rm/unread2 b/tests/rm/unread2
index 69c27474e..a67298362 100755
--- a/tests/rm/unread2
+++ b/tests/rm/unread2
@@ -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 && rm --version
+print_ver_ rm
skip_if_root_
mkdir -p a/b || framework_failure
diff --git a/tests/rm/unread3 b/tests/rm/unread3
index a2782bbba..a95562d13 100755
--- a/tests/rm/unread3
+++ b/tests/rm/unread3
@@ -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 && rm --version
+print_ver_ rm
skip_if_root_
mkdir -p a/1 b c d/2 e/3 || framework_failure
diff --git a/tests/rm/v-slash b/tests/rm/v-slash
index a9ab828bc..7734df7b8 100755
--- a/tests/rm/v-slash
+++ b/tests/rm/v-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 && rm --version
+print_ver_ rm
mkdir a || framework_failure
touch a/x || framework_failure