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.
This commit is contained in:
Jim Meyering committed 2012-04-04 12:22:24 +02:00
1 parent b1e9cb9cd2
commit 33230a19ca
11 files changed
+28 -30

No files matched your search

+4 -4
View File
@@ -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
+6 -6
View File
@@ -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" \
+3 -3
View 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.
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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"
+1 -1
View File
@@ -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.
-1
View File
@@ -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_
;;
+6 -6
View File
@@ -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.
+2 -2
View File
@@ -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";;
+2 -2
View File
@@ -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";;
-1
View File
@@ -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