[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[FYI] tests: more uses of $(...) over `...` for command substitution
From: |
Stefano Lattarini |
Subject: |
[FYI] tests: more uses of $(...) over `...` for command substitution |
Date: |
Fri, 22 Jun 2012 23:31:40 +0200 |
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 <address@hidden>
---
t/autodist-no-duplicate.sh | 12 ++++++------
t/autodist-subdir.sh | 6 +++---
t/autodist.sh | 6 +++---
t/ax/depcomp.sh | 10 +++++-----
t/perf/testsuite-recheck.sh | 2 +-
t/perf/testsuite-summary.sh | 2 +-
t/remake11.sh | 8 ++++----
t/self-check-me.tap | 4 ++--
8 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/t/autodist-no-duplicate.sh b/t/autodist-no-duplicate.sh
index 2e610ae..0055e4c 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 19d22dc..1454edd 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 f8f68ad..952df4a 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 7a60229..f8e372f 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 50cc03b..6fd793b 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 a11bb8e..cefef17 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 93ef224..3b97df9 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 2b720fa..0ac8e20 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
--
1.7.9.5
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [FYI] tests: more uses of $(...) over `...` for command substitution,
Stefano Lattarini <=