summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-04-03 21:42:48 +0200
committerJim Meyering <meyering@redhat.com>2012-04-04 12:22:24 +0200
commit33230a19ca27d99629a7c8000f56ecce22e956fa (patch)
treea63b2a76eee78589504868d5fa569776a7518ece
parentb1e9cb9cd2945832b914922fa43808d6f467ba19 (diff)
downloadcoreutils-33230a19ca27d99629a7c8000f56ecce22e956fa.tar.xz
tests: remove nearly all remaining backticks
* tests/rm/isatty: Remove now-unneeded "# `" line. * tests/misc/ls-time: Likewise. * tests/misc/date-sec: Remove stray "`" in comment. * tests/du/long-sloop: Likewise. * tests/mv/part-symlink: Replace multi-line `...` by $(...). * tests/mv/sticky-to-xpart: Likewise. * tests/rm/fail-2eperm: Likewise. * tests/ls/nameless-uid: Likewise. * tests/cp/perm: Likewise. * tests/cp/preserve-gid: Likewise. * tests/cp/same-file: Likewise.
-rwxr-xr-xtests/cp/perm8
-rwxr-xr-xtests/cp/preserve-gid12
-rwxr-xr-xtests/cp/same-file6
-rwxr-xr-xtests/du/long-sloop4
-rwxr-xr-xtests/ls/nameless-uid4
-rwxr-xr-xtests/misc/date-sec2
-rwxr-xr-xtests/misc/ls-time1
-rwxr-xr-xtests/mv/part-symlink12
-rwxr-xr-xtests/mv/sticky-to-xpart4
-rwxr-xr-xtests/rm/fail-2eperm4
-rwxr-xr-xtests/rm/isatty1
11 files changed, 28 insertions, 30 deletions
diff --git a/tests/cp/perm b/tests/cp/perm
index eb3925da2..a93df7182 100755
--- a/tests/cp/perm
+++ b/tests/cp/perm
@@ -55,13 +55,13 @@ for u in 31 37 2; do
;;
cp:*:no)
test $u = 37 &&
- expected_perms=`
+ expected_perms=$(
echo $expected_perms | sed 's/.....$/-----/'
- `
+ )
test $u = 31 &&
- expected_perms=`
+ expected_perms=$(
echo $expected_perms | sed 's/..\(..\).$/--\1-/'
- `
+ )
;;
esac
test _$actual_perms = _$expected_perms || exit 1
diff --git a/tests/cp/preserve-gid b/tests/cp/preserve-gid
index 6f371c3fb..746c57a60 100755
--- a/tests/cp/preserve-gid
+++ b/tests/cp/preserve-gid
@@ -52,24 +52,24 @@ t0() {
fi
}
-nameless_uid=`$PERL -le '
+nameless_uid=$($PERL -le '
foreach my $i (1000..16*1024-1)
{
getpwuid $i or (print $i), exit
}
-'`
-nameless_gid1=`$PERL -le '
+')
+nameless_gid1=$($PERL -le '
foreach my $i (1000..16*1024)
{
getgrgid $i or (print $i), exit
}
-'`
-nameless_gid2=`$PERL -le '
+')
+nameless_gid2=$($PERL -le '
foreach my $i ('"$nameless_gid1"'+1..16*1024)
{
getgrgid $i or (print $i), exit
}
-'`
+')
if test -z "$nameless_uid" \
|| test -z "$nameless_gid1" \
diff --git a/tests/cp/same-file b/tests/cp/same-file
index dbd4d01b6..2ca7bf6ba 100755
--- a/tests/cp/same-file
+++ b/tests/cp/same-file
@@ -102,10 +102,10 @@ for args in 'foo symlink' 'symlink foo' 'foo foo' 'sl1 sl2' 'foo hardlink'; do
' _err
fi
# Strip off all but the file names.
- ls=`ls -gG --ignore=_err . \
- | sed \
+ ls=$(ls -gG --ignore=_err . \
+ | sed \
-e '/^total /d' \
- -e 's/^[^ ]* *[^ ]* *[^ ]* *[^ ]* *[^ ]* *[^ ]* *//'`
+ -e 's/^[^ ]* *[^ ]* *[^ ]* *[^ ]* *[^ ]* *[^ ]* *//')
echo "($ls)"
# Make sure the original is unchanged and that
# the destination is a copy.
diff --git a/tests/du/long-sloop b/tests/du/long-sloop
index f9e70ad00..48e2e30ac 100755
--- a/tests/du/long-sloop
+++ b/tests/du/long-sloop
@@ -50,8 +50,8 @@ echo foo > $i
# The following also serves to record in 'err' the string
# corresponding to strerror (ELOOP). This is necessary because while
# Linux/libc gives 'Too many levels of symbolic links', Solaris
-# renders it as `Number of symbolic links encountered during path
-# name traversal exceeds MAXSYMLINKS'.
+# renders it as "Number of symbolic links encountered during path
+# name traversal exceeds MAXSYMLINKS".
cat $file > /dev/null 2> err &&
skip_ 'Your system appears to be able to handle more than $n symlinks
diff --git a/tests/ls/nameless-uid b/tests/ls/nameless-uid
index 1c8c4718f..5b45b091b 100755
--- a/tests/ls/nameless-uid
+++ b/tests/ls/nameless-uid
@@ -22,9 +22,9 @@ print_ver_ ls
require_root_
require_perl_
-nameless_uid=`$PERL -e '
+nameless_uid=$($PERL -e '
foreach my $i (1000..16*1024) { getpwuid $i or (print "$i\n"), exit }
-'`
+')
if test x$nameless_uid = x; then
skip_ "couldn't find a nameless UID"
diff --git a/tests/misc/date-sec b/tests/misc/date-sec
index df77fe7bd..a46b47903 100755
--- a/tests/misc/date-sec
+++ b/tests/misc/date-sec
@@ -1,6 +1,6 @@
#!/bin/sh
# Ensure that a command like
-# `date --date="21:04 +0100" +%S' always prints '00'.
+# date --date="21:04 +0100" +%S' always prints '00'.
# Before coreutils-5.2.1, it would print the seconds from the current time.
# Copyright (C) 2004-2012 Free Software Foundation, Inc.
diff --git a/tests/misc/ls-time b/tests/misc/ls-time
index 7bc3c642b..7d1f205fc 100755
--- a/tests/misc/ls-time
+++ b/tests/misc/ls-time
@@ -70,7 +70,6 @@ tests in this file will not be run.
In the output below, the date of last modification for 'a' should
have been $t3.
EOF
- #`
ls --full -l a
framework_failure_
;;
diff --git a/tests/mv/part-symlink b/tests/mv/part-symlink
index 2e7cf1b8b..e57de3c96 100755
--- a/tests/mv/part-symlink
+++ b/tests/mv/part-symlink
@@ -96,18 +96,18 @@ for copy in cp mv; do
}
# Strip off all but the file names.
# Remove any site-dependent part of each file name.
- ls=`ls -gG --ignore=.err . \
- | sed \
+ ls=$(ls -gG --ignore=.err . \
+ | sed \
-e '/^total /d' \
-e "s,$other_partition_tmpdir/,," \
-e "s,$pwd_tmp/,," \
- -e 's/^[^ ]* *[^ ]* *[^ ]* *[^ ]* *[^ ]* *[^ ]* *//'`
- ls2=`cd "$other_partition_tmpdir" && ls -gG --ignore=.err . \
- | sed \
+ -e 's/^[^ ]* *[^ ]* *[^ ]* *[^ ]* *[^ ]* *[^ ]* *//')
+ ls2=$(cd "$other_partition_tmpdir" && ls -gG --ignore=.err . \
+ | sed \
-e '/^total /d' \
-e "s,$other_partition_tmpdir/,," \
-e "s,$pwd_tmp/,," \
- -e 's/^[^ ]* *[^ ]* *[^ ]* *[^ ]* *[^ ]* *[^ ]* *//'`
+ -e 's/^[^ ]* *[^ ]* *[^ ]* *[^ ]* *[^ ]* *[^ ]* *//')
echo " ("$ls") ("$ls2")"
# If the command failed, then it must not have changed the files.
diff --git a/tests/mv/sticky-to-xpart b/tests/mv/sticky-to-xpart
index 954cb8f0e..6df65024e 100755
--- a/tests/mv/sticky-to-xpart
+++ b/tests/mv/sticky-to-xpart
@@ -41,10 +41,10 @@ chmod go+x . || framework_failure_
# Ensure that $NON_ROOT_USERNAME can access the required version of mv.
-version=`
+version=$(
setuidgid $NON_ROOT_USERNAME env PATH="$PATH" mv --version |
sed -n '1s/.* //p'
-`
+)
case $version in
$PACKAGE_VERSION) ;;
*) skip_ "cannot access just-built mv as user $NON_ROOT_USERNAME";;
diff --git a/tests/rm/fail-2eperm b/tests/rm/fail-2eperm
index 9162892ee..fa2f43227 100755
--- a/tests/rm/fail-2eperm
+++ b/tests/rm/fail-2eperm
@@ -31,10 +31,10 @@ touch a/b || framework_failure_
# Try to ensure that $NON_ROOT_USERNAME can access
# the required version of rm.
-rm_version=`
+rm_version=$(
setuidgid $NON_ROOT_USERNAME env PATH="$PATH" rm --version |
sed -n '1s/.* //p'
-`
+)
case $rm_version in
$PACKAGE_VERSION) ;;
*) skip_ "cannot access just-built rm as user $NON_ROOT_USERNAME";;
diff --git a/tests/rm/isatty b/tests/rm/isatty
index b1e558b66..f28653cc8 100755
--- a/tests/rm/isatty
+++ b/tests/rm/isatty
@@ -44,7 +44,6 @@ kill $pid > /dev/null 2>&1
cat > exp <<\EOF
rm: remove write-protected regular empty file 'f'? x
EOF
-#`
# Append an 'x' and a newline.
echo x >> out