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/mv | |
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/mv')
-rwxr-xr-x | tests/mv/atomic | 2 | ||||
-rwxr-xr-x | tests/mv/atomic2 | 2 | ||||
-rwxr-xr-x | tests/mv/backup-dir | 2 | ||||
-rwxr-xr-x | tests/mv/backup-is-src | 2 | ||||
-rwxr-xr-x | tests/mv/diag | 2 | ||||
-rwxr-xr-x | tests/mv/dir-file | 2 | ||||
-rwxr-xr-x | tests/mv/dir2dir | 2 | ||||
-rwxr-xr-x | tests/mv/force | 2 | ||||
-rwxr-xr-x | tests/mv/hard-3 | 2 | ||||
-rwxr-xr-x | tests/mv/hard-4 | 2 | ||||
-rwxr-xr-x | tests/mv/hard-link-1 | 2 | ||||
-rwxr-xr-x | tests/mv/hard-verbose | 2 | ||||
-rwxr-xr-x | tests/mv/i-3 | 2 | ||||
-rwxr-xr-x | tests/mv/i-4 | 2 | ||||
-rwxr-xr-x | tests/mv/i-5 | 2 | ||||
-rwxr-xr-x | tests/mv/i-link-no | 2 | ||||
-rwxr-xr-x | tests/mv/into-self | 2 | ||||
-rwxr-xr-x | tests/mv/into-self-2 | 2 | ||||
-rwxr-xr-x | tests/mv/into-self-3 | 2 | ||||
-rwxr-xr-x | tests/mv/into-self-4 | 2 | ||||
-rwxr-xr-x | tests/mv/leak-fd | 2 | ||||
-rwxr-xr-x | tests/mv/mv-n | 2 | ||||
-rwxr-xr-x | tests/mv/mv-special-1 | 2 | ||||
-rwxr-xr-x | tests/mv/no-target-dir | 2 | ||||
-rwxr-xr-x | tests/mv/part-fail | 2 | ||||
-rwxr-xr-x | tests/mv/part-hardlink | 2 | ||||
-rwxr-xr-x | tests/mv/part-rename | 2 | ||||
-rwxr-xr-x | tests/mv/partition-perm | 2 | ||||
-rwxr-xr-x | tests/mv/perm-1 | 2 | ||||
-rwxr-xr-x | tests/mv/sticky-to-xpart | 2 | ||||
-rwxr-xr-x | tests/mv/to-symlink | 2 | ||||
-rwxr-xr-x | tests/mv/trailing-slash | 2 |
32 files changed, 32 insertions, 32 deletions
diff --git a/tests/mv/atomic b/tests/mv/atomic index 5df2d60fd..c75e62bb4 100755 --- a/tests/mv/atomic +++ b/tests/mv/atomic @@ -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 && mv --version +print_ver_ mv require_strace_ unlink # Before the fix, mv would unnecessarily unlink the destination symlink: diff --git a/tests/mv/atomic2 b/tests/mv/atomic2 index 4bc0e73fe..947f6b012 100755 --- a/tests/mv/atomic2 +++ b/tests/mv/atomic2 @@ -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 && mv --version +print_ver_ mv require_strace_ unlink # Before the fix, mv would unnecessarily unlink the destination symlink: diff --git a/tests/mv/backup-dir b/tests/mv/backup-dir index a96edc680..c577883e4 100755 --- a/tests/mv/backup-dir +++ b/tests/mv/backup-dir @@ -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 && mv --version +print_ver_ mv mkdir A B || framework_failure touch X Y || framework_failure diff --git a/tests/mv/backup-is-src b/tests/mv/backup-is-src index fe5c68049..9145b008a 100755 --- a/tests/mv/backup-is-src +++ b/tests/mv/backup-is-src @@ -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 && mv --version +print_ver_ mv cleanup_() { rm -rf "$other_partition_tmpdir"; } . "$abs_srcdir/other-fs-tmpdir" diff --git a/tests/mv/diag b/tests/mv/diag index d32513d9b..5a31c0be5 100755 --- a/tests/mv/diag +++ b/tests/mv/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 && mv --version +print_ver_ mv touch f1 || framework_failure touch f2 || framework_failure diff --git a/tests/mv/dir-file b/tests/mv/dir-file index ebe2a673f..9fd125f0a 100755 --- a/tests/mv/dir-file +++ b/tests/mv/dir-file @@ -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 && mv --version +print_ver_ mv mkdir -p dir/file || framework_failure > file || framework_failure diff --git a/tests/mv/dir2dir b/tests/mv/dir2dir index de7770b5d..915a0fbc5 100755 --- a/tests/mv/dir2dir +++ b/tests/mv/dir2dir @@ -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 && mv --version +print_ver_ mv mkdir -p a/t b/t || framework_failure touch a/t/f || framework_failure diff --git a/tests/mv/force b/tests/mv/force index 708efcbf4..08c5cf750 100755 --- a/tests/mv/force +++ b/tests/mv/force @@ -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 && mv --version +print_ver_ mv ff=mvforce ff2=mvforce2 diff --git a/tests/mv/hard-3 b/tests/mv/hard-3 index 61d71c1fa..eb69b02e7 100755 --- a/tests/mv/hard-3 +++ b/tests/mv/hard-3 @@ -31,7 +31,7 @@ # mv enables by default. . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && cp --version +print_ver_ cp skip_if_root_ mkdir -p x dst/x || framework_failure diff --git a/tests/mv/hard-4 b/tests/mv/hard-4 index b22969eb4..476464090 100755 --- a/tests/mv/hard-4 +++ b/tests/mv/hard-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 && mv --version +print_ver_ mv touch a || framework_failure ln a b || framework_failure diff --git a/tests/mv/hard-link-1 b/tests/mv/hard-link-1 index 3d7c6abf0..b03d9268e 100755 --- a/tests/mv/hard-link-1 +++ b/tests/mv/hard-link-1 @@ -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 && mv --version +print_ver_ mv cleanup_() { rm -rf "$other_partition_tmpdir"; } . "$abs_srcdir/other-fs-tmpdir" diff --git a/tests/mv/hard-verbose b/tests/mv/hard-verbose index 8c0dfe0fa..5a057b42c 100755 --- a/tests/mv/hard-verbose +++ b/tests/mv/hard-verbose @@ -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 && mv --version +print_ver_ mv touch x || framework_failure ln x y || framework_failure diff --git a/tests/mv/i-3 b/tests/mv/i-3 index fededda97..983aad945 100755 --- a/tests/mv/i-3 +++ b/tests/mv/i-3 @@ -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 && mv --version +print_ver_ mv require_controlling_input_terminal_ skip_if_root_ trap '' TTIN # Ignore SIGTTIN diff --git a/tests/mv/i-4 b/tests/mv/i-4 index d5d746561..72d0f1161 100755 --- a/tests/mv/i-4 +++ b/tests/mv/i-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 && mv --version +print_ver_ mv for i in a b; do echo $i > $i || framework_failure diff --git a/tests/mv/i-5 b/tests/mv/i-5 index e73d4b209..bcf3fd910 100755 --- a/tests/mv/i-5 +++ b/tests/mv/i-5 @@ -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 && mv --version +print_ver_ mv mkdir a || framework_failure touch b || framework_failure diff --git a/tests/mv/i-link-no b/tests/mv/i-link-no index 2d7630109..471765d7f 100755 --- a/tests/mv/i-link-no +++ b/tests/mv/i-link-no @@ -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 && mv --version +print_ver_ mv mkdir a b || framework_failure echo foo > a/foo || framework_failure diff --git a/tests/mv/into-self b/tests/mv/into-self index 2c28a2f71..42786bd10 100755 --- a/tests/mv/into-self +++ b/tests/mv/into-self @@ -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 && mv --version +print_ver_ mv dir=toself-dir file=toself-file diff --git a/tests/mv/into-self-2 b/tests/mv/into-self-2 index c5d1bd5c4..1bd90e065 100755 --- a/tests/mv/into-self-2 +++ b/tests/mv/into-self-2 @@ -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 && mv --version +print_ver_ mv cleanup_() { rm -rf "$other_partition_tmpdir"; } . "$abs_srcdir/other-fs-tmpdir" diff --git a/tests/mv/into-self-3 b/tests/mv/into-self-3 index 8a506626c..8a82e8914 100755 --- a/tests/mv/into-self-3 +++ b/tests/mv/into-self-3 @@ -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 && mv --version +print_ver_ mv dir1=is3-dir1 dir2=is3-dir2 diff --git a/tests/mv/into-self-4 b/tests/mv/into-self-4 index 18a32dc59..ed4d4f5e8 100755 --- a/tests/mv/into-self-4 +++ b/tests/mv/into-self-4 @@ -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 && mv --version +print_ver_ mv touch file || framework_failure ln -s file s || framework_failure diff --git a/tests/mv/leak-fd b/tests/mv/leak-fd index 3155397e7..229c63ef4 100755 --- a/tests/mv/leak-fd +++ b/tests/mv/leak-fd @@ -19,7 +19,7 @@ # limit so don't run it by default. . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && mv --version +print_ver_ mv skip_if_root_ cleanup_() { rm -rf "$other_partition_tmpdir"; } . "$abs_srcdir/other-fs-tmpdir" diff --git a/tests/mv/mv-n b/tests/mv/mv-n index 32739dd9f..8cbf1b965 100755 --- a/tests/mv/mv-n +++ b/tests/mv/mv-n @@ -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 && mv --version +print_ver_ mv # test miscellaneous combinations of -f -i -n parameters diff --git a/tests/mv/mv-special-1 b/tests/mv/mv-special-1 index fe10acda7..8e7bfcd21 100755 --- a/tests/mv/mv-special-1 +++ b/tests/mv/mv-special-1 @@ -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 && mv --version +print_ver_ mv cleanup_() { rm -rf "$other_partition_tmpdir"; } . "$abs_srcdir/other-fs-tmpdir" diff --git a/tests/mv/no-target-dir b/tests/mv/no-target-dir index f1d886ba5..56930fd65 100755 --- a/tests/mv/no-target-dir +++ b/tests/mv/no-target-dir @@ -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 && mv --version +print_ver_ mv mkdir -p d/sub empty src d2/sub e2 || framework_failure touch f || framework_failure diff --git a/tests/mv/part-fail b/tests/mv/part-fail index c167076af..2d80f599d 100755 --- a/tests/mv/part-fail +++ b/tests/mv/part-fail @@ -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 && mv --version +print_ver_ mv skip_if_root_ cleanup_() { t=$other_partition_tmpdir; chmod -R 700 "$t"; rm -rf "$t"; } . "$abs_srcdir/other-fs-tmpdir" diff --git a/tests/mv/part-hardlink b/tests/mv/part-hardlink index b97b0a0b5..8eaf5cd68 100755 --- a/tests/mv/part-hardlink +++ b/tests/mv/part-hardlink @@ -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 && mv --version +print_ver_ mv cleanup_() { rm -rf "$other_partition_tmpdir"; } . "$abs_srcdir/other-fs-tmpdir" diff --git a/tests/mv/part-rename b/tests/mv/part-rename index 3f18045b4..41e60fb80 100755 --- a/tests/mv/part-rename +++ b/tests/mv/part-rename @@ -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 && mv --version +print_ver_ mv cleanup_() { rm -rf "$other_partition_tmpdir"; } . "$abs_srcdir/other-fs-tmpdir" diff --git a/tests/mv/partition-perm b/tests/mv/partition-perm index 01b1697d4..d04363021 100755 --- a/tests/mv/partition-perm +++ b/tests/mv/partition-perm @@ -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 && mv --version +print_ver_ mv cleanup_() { rm -rf "$other_partition_tmpdir"; } . "$abs_srcdir/other-fs-tmpdir" diff --git a/tests/mv/perm-1 b/tests/mv/perm-1 index fda23ed2d..944f63136 100755 --- a/tests/mv/perm-1 +++ b/tests/mv/perm-1 @@ -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 && mv --version +print_ver_ mv skip_if_root_ mkdir -p no-write/dir || framework_failure diff --git a/tests/mv/sticky-to-xpart b/tests/mv/sticky-to-xpart index 513c32565..dbb558483 100755 --- a/tests/mv/sticky-to-xpart +++ b/tests/mv/sticky-to-xpart @@ -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 && mv --version +print_ver_ mv require_root_ cleanup_() { rm -rf "$other_partition_tmpdir"; } diff --git a/tests/mv/to-symlink b/tests/mv/to-symlink index 5530eee4f..26b7a275a 100755 --- a/tests/mv/to-symlink +++ b/tests/mv/to-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 && mv --version +print_ver_ mv cleanup_() { rm -rf "$other_partition_tmpdir"; } . "$abs_srcdir/other-fs-tmpdir" diff --git a/tests/mv/trailing-slash b/tests/mv/trailing-slash index b0b362c8f..b58c90822 100755 --- a/tests/mv/trailing-slash +++ b/tests/mv/trailing-slash @@ -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 && mv --version +print_ver_ mv mkdir foo || framework_failure |