From: Stefano Lattarini Date: Fri, 22 Jun 2012 21:31:00 +0000 (+0200) Subject: tests: more uses of $(...) over `...` for command substitution X-Git-Tag: v1.12.2~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=465111cdfd1b92feaf9c6fd679cf1845c4e53083;p=thirdparty%2Fautomake.git tests: more uses of $(...) over `...` for command substitution Somehow missed by the previous changes. No big deal, fix them now. * t/ax/depcomp.sh: Here. * t/autodist.sh: And here. * t/autodist-no-duplicate.sh: And here. * t/autodist-subdir.sh: Ad here. * t/remake11.sh t/self-check-me.tap: And here. * t/perf/testsuite-summary.sh: And here. * t/perf/testsuite-recheck.sh: And here. Signed-off-by: Stefano Lattarini --- diff --git a/t/autodist-no-duplicate.sh b/t/autodist-no-duplicate.sh index 2e610ae02..0055e4cd1 100755 --- a/t/autodist-no-duplicate.sh +++ b/t/autodist-no-duplicate.sh @@ -24,14 +24,14 @@ re='Files .*automatically distributed.*if found' # The automake manual states that the list of automatically-distributed # files should be given by 'automake --help'. -list1=`$AUTOMAKE --help \ - | sed -n "/^$re.*always/,/^ *$/p" \ - | sed 1d` +list1=$($AUTOMAKE --help \ + | sed -n "/^$re.*always/,/^ *$/p" \ + | sed 1d) list1=$(echo $list1) -list2=`$AUTOMAKE --help \ - | sed -n "/^$re.*under certain conditions/,/^ *$/p" \ - | sed 1d` +list2=$($AUTOMAKE --help \ + | sed -n "/^$re.*under certain conditions/,/^ *$/p" \ + | sed 1d) list2=$(echo $list2) test -n "$list1" diff --git a/t/autodist-subdir.sh b/t/autodist-subdir.sh index 19d22dc4f..1454edd7b 100755 --- a/t/autodist-subdir.sh +++ b/t/autodist-subdir.sh @@ -36,9 +36,9 @@ $AUTOCONF # The automake manual states that the list of automatically-distributed # files should be given by 'automake --help'. -list=`$AUTOMAKE --help \ - | sed -n '/^Files.*automatically distributed.*if found.*always/,/^ *$/p' \ - | sed 1d` +list=$($AUTOMAKE --help \ + | sed -n '/^Files.*automatically distributed.*if found.*always/,/^ *$/p' \ + | sed 1d) # Normalize whitespace, just in case. list=$(echo $list) diff --git a/t/autodist.sh b/t/autodist.sh index f8f68ad24..952df4abd 100755 --- a/t/autodist.sh +++ b/t/autodist.sh @@ -35,9 +35,9 @@ $AUTOCONF # The automake manual states that the list of automatically-distributed # files should be given by 'automake --help'. -list=`$AUTOMAKE --help \ - | sed -n '/^Files.*automatically distributed.*if found.*always/,/^ *$/p' \ - | sed 1d` +list=$($AUTOMAKE --help \ + | sed -n '/^Files.*automatically distributed.*if found.*always/,/^ *$/p' \ + | sed 1d) # Normalize whitespace, just in case. list=$(echo $list) diff --git a/t/ax/depcomp.sh b/t/ax/depcomp.sh index 7a602291a..f8e372f16 100644 --- a/t/ax/depcomp.sh +++ b/t/ax/depcomp.sh @@ -134,11 +134,11 @@ AM_INIT_AUTOMAKE AC_PROG_CC AM_PROG_CC_C_O AM_PROG_AR -`if test $depcomp_with_libtool = yes; then - echo AC_PROG_LIBTOOL -else - echo AC_PROG_RANLIB -fi` +$(if test $depcomp_with_libtool = yes; then + echo AC_PROG_LIBTOOL + else + echo AC_PROG_RANLIB + fi) AC_CONFIG_FILES([Makefile src/Makefile]) AC_OUTPUT END diff --git a/t/perf/testsuite-recheck.sh b/t/perf/testsuite-recheck.sh index 50cc03ba2..6fd793b02 100755 --- a/t/perf/testsuite-recheck.sh +++ b/t/perf/testsuite-recheck.sh @@ -69,7 +69,7 @@ END # Temporarily disable shell traces, to avoid bloating the log file. set +x -for i in `seq_ 1 $count`; do +for i in $(seq_ 1 $count); do echo dummy $i > $i.log echo :global-test-result: PASS > $i.trs echo :test-result: PASS >> $i.trs diff --git a/t/perf/testsuite-summary.sh b/t/perf/testsuite-summary.sh index a11bb8ef7..cefef170c 100755 --- a/t/perf/testsuite-summary.sh +++ b/t/perf/testsuite-summary.sh @@ -38,7 +38,7 @@ END # Temporarily disable shell traces, to avoid bloating the log file. set +x -for i in `seq_ 1 $count`; do +for i in $(seq_ 1 $count); do echo false > $i.t echo dummy $i > $i.log echo :global-test-result: PASS > $i.trs diff --git a/t/remake11.sh b/t/remake11.sh index 93ef22449..3b97df9c9 100755 --- a/t/remake11.sh +++ b/t/remake11.sh @@ -48,10 +48,10 @@ bottom=$(pwd) || fatal_ "getting current working directory" cd "$ocwd" -makefiles_am_list=`find . -name Makefile.am | LC_ALL=C sort` -makefiles_list=`echo "$makefiles_am_list" | sed 's/\.am$//'` -bar_in_list=`find . -name bar.in | LC_ALL=C sort` -bar_list=`echo "$bar_in_list" | sed 's/\.in$//'` +makefiles_am_list=$(find . -name Makefile.am | LC_ALL=C sort) +makefiles_list=$(echo "$makefiles_am_list" | sed 's/\.am$//') +bar_in_list=$(find . -name bar.in | LC_ALL=C sort) +bar_list=$(echo "$bar_in_list" | sed 's/\.in$//') cat configure.ac # For debugging. diff --git a/t/self-check-me.tap b/t/self-check-me.tap index 2b720fafa..0ac8e20c7 100755 --- a/t/self-check-me.tap +++ b/t/self-check-me.tap @@ -59,8 +59,8 @@ result_ "$r" "override of \$me before ./defs is honored" unset r # Overriding $me after sourcing ./defs-static should work. -s=`$AM_TEST_RUNNER_SHELL -c '. ./defs-static && me=zardoz && - . ./defs && echo me=$me' bad.sh` +s=$($AM_TEST_RUNNER_SHELL -c '. ./defs-static && me=zardoz && + . ./defs && echo me=$me' bad.sh) command_ok_ "override of \$me after ./defs-static causes no error" \ test $? -eq 0