From 8f9be76b0d6995919ee960ce5864715faa11ea5b Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 17 Nov 2010 21:38:38 +0100 Subject: tests: convert the multi-prog $VERBOSE/--version uses E.g., -test "$VERBOSE" = yes && { env -- pwd --version; readlink --version; } +print_ver_ pwd readlink -test "$VERBOSE" = yes && { stdbuf --version; mv --version; } +print_ver_ stdbuf mv Use this command: git grep -l 'VERBOSE.*--version'|xargs perl -ni \ -e '/^test "\$VERBOSE" = yes && { .*--version/ or print,next;' \ -e 's/env -- //g;' \ -e 's/test "\$VERBOSE" = yes && { /print_ver_ /;' \ -e ' s/(\w+) --version;/$1/g; s/ *}$//; print' --- tests/cp/acl | 2 +- tests/cp/cp-mv-enotsup-xattr | 2 +- tests/cp/perm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/cp') diff --git a/tests/cp/acl b/tests/cp/acl index a3b909ae4..392675703 100755 --- a/tests/cp/acl +++ b/tests/cp/acl @@ -18,7 +18,7 @@ # along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && { mv --version; getfacl --version; setfacl --version; } +print_ver_ mv getfacl setfacl require_acl_ diff --git a/tests/cp/cp-mv-enotsup-xattr b/tests/cp/cp-mv-enotsup-xattr index bcee4214f..d3516f6d6 100755 --- a/tests/cp/cp-mv-enotsup-xattr +++ b/tests/cp/cp-mv-enotsup-xattr @@ -19,7 +19,7 @@ # along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && { cp --version; mv --version; } +print_ver_ cp mv require_root_ diff --git a/tests/cp/perm b/tests/cp/perm index cb4709f50..e5fdb098d 100755 --- a/tests/cp/perm +++ b/tests/cp/perm @@ -17,7 +17,7 @@ # along with this program. If not, see . . "${srcdir=.}/init.sh"; path_prepend_ ../src -test "$VERBOSE" = yes && { cp --version; mv --version; } +print_ver_ cp mv very_expensive_ -- cgit v1.2.3-70-g09d2