1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-21 03:12:48 +02:00

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'
This commit is contained in:
Jim Meyering
2010-11-17 21:38:38 +01:00
parent a8c8484ee1
commit 8f9be76b0d
17 changed files with 17 additions and 17 deletions

View 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 && { chgrp --version; chmod --version; chown --version; }
print_ver_ chgrp chmod chown
chmod -f 0 no-such 2> out && fail=1
chgrp -f 0 no-such 2>> out && fail=1