sed 's,d/no-x/y,d/no-x,' out > t && mv t out
cat <<EOF > exp
-$prog: \`d/no-x': Permission denied
+$prog: 'd/no-x': Permission denied
EOF
compare exp out || fail=1
test -s empty && fail=1
case "`cat out`" in
- "mode of \`f' changed from 0744 "?rwxr--r--?" to 0774 "?rwxrwxr--?) ;;
+ "mode of 'f' changed from 0744 "?rwxr--r--?" to 0774 "?rwxrwxr--?) ;;
*) cat out; fail=1 ;;
esac
chmod a=r,$mode $file || fail=1
case "`ls -l $file`" in
---x--x---*) ;;
- *) fail=1; echo "after \`chmod $mode $file':"; ls -l $file ;;
+ *) fail=1; echo "after 'chmod $mode $file':"; ls -l $file ;;
esac
done
sed 's,d/no-x/y,d/no-x,' out > t && mv t out
cat <<EOF > exp
-$prog: \`d/no-x': Permission denied
+$prog: 'd/no-x': Permission denied
EOF
compare exp out || fail=1
# This operation cannot succeed since the symbolic link dangles.
chmod 644 dangle 2> out && fail=1
-echo "chmod: cannot operate on dangling symlink \`dangle'" > exp
+echo "chmod: cannot operate on dangling symlink 'dangle'" > exp
compare exp out || fail=1
Exit $fail
# Make sure the correct diagnostic is output
# Note we output a name even though an id was specified.
chown -v --from=42 43 f > out || fail=1
-printf "ownership of \`f' retained as `id -nu`\n" > exp
+printf "ownership of 'f' retained as `id -nu`\n" > exp
compare exp out || fail=1
# Ensure diagnostics work for non existent files.
chown -v 0 nf > out && fail=1
-printf "failed to change ownership of \`nf' to 0\n" > exp
+printf "failed to change ownership of 'nf' to 0\n" > exp
compare exp out || fail=1
chown --from=0:1 2:010 f || fail=1
ln -s ../t a/1 || framework_failure_
echo payload > b/1 || framework_failure_
-echo "cp: will not copy \`b/1' through just-created symlink \`c/1'" \
+echo "cp: will not copy 'b/1' through just-created symlink 'c/1'" \
> exp || framework_failure_
# Check both cases: a dangling symlink, and one pointing to a writable file.
# test miscellaneous combinations of -f -i -n parameters
touch c d || framework_failure_
-echo "\`c' -> \`d'" > out_copy
+echo "'c' -> 'd'" > out_copy
> out_empty
# ask for overwrite, answer no
ln -s no-such dangle || framework_failure_
echo hi > f || framework_failure_
echo hi > exp || framework_failure_
-echo "cp: not writing through dangling symlink \`dangle'" \
+echo "cp: not writing through dangling symlink 'dangle'" \
> exp-err || framework_failure_
timeout 10 dd bs=1 skip=$DEV_OFLOW count=0 status=noxfer < "$device" 2> err
test "$?" = "1" || fail=1
-echo "dd: \`standard input': cannot skip: Invalid argument
+echo "dd: 'standard input': cannot skip: Invalid argument
0+0 records in
0+0 records out" > err_ok || framework_failure_
compare err_ok err || fail=1
timeout 10 dd bs=1 seek=$DEV_OFLOW count=0 status=noxfer > "$device" 2> err
test "$?" = "1" || fail=1
-echo "dd: \`standard output': cannot seek: Invalid argument
+echo "dd: 'standard output': cannot seek: Invalid argument
0+0 records in
0+0 records out" > err_ok || framework_failure_
compare err_ok err || fail=1
printf "1234" > file || framework_failure_
echo "\
-dd: \`standard input': cannot skip to specified offset
+dd: 'standard input': cannot skip to specified offset
0+0 records in
0+0 records out" > skip_err || framework_failure_
sed 's,d/no-x/y,d/no-x,' out > t && mv t out
cat <<EOF > exp
-$prog: \`d/no-x': Permission denied
+$prog: 'd/no-x': Permission denied
EOF
compare exp out || fail=1
if df --type=xfs . >/dev/null 2>&1; then
# At least on Irix-6.5.19, when using an xfs file system,
# each created symlink (name lengths up to 255) would have a size of `0'.
- skip_ "\`.' is on an XFS file system"
+ skip_ "'.' is on an XFS file system"
fi
symlink_name_lengths='1 15 16 31 32 59 60 63 64 127 128 255 256 511 512 1024'
require_gnu_
-sush - true || skip_ "the \`sush' command does not work"
+sush - true || skip_ "the 'sush' command does not work"
# Run `id' with zero UIDs. It should exit with a non-zero status.
sush - id > out && fail=1
{
# Make sure id -u succeeds.
my_uid=$(id -u) \
- || { echo "$0: cannot run \`id -u'" 1>&2; return 1; }
+ || { echo "$0: cannot run 'id -u'" 1>&2; return 1; }
# Make sure it gives valid output.
case $my_uid in
0) ;;
*[!0-9]*)
- echo "$0: invalid output (\`$my_uid') from \`id -u'" 1>&2
+ echo "$0: invalid output ('$my_uid') from 'id -u'" 1>&2
return 1 ;;
*) return 1 ;;
esac
echo test > a || framework_failure_
-echo "\`a' -> \`b'" > out_installed_first || framework_failure_
-echo "removed \`b'
-\`a' -> \`b'" > out_installed_second || framework_failure_
+echo "'a' -> 'b'" > out_installed_first || framework_failure_
+echo "removed 'b'
+'a' -> 'b'" > out_installed_second || framework_failure_
: > out_empty || framework_failure_
# destination file does not exist
ln -s a c || framework_failure_
ln -s b d || framework_failure_
ginstall -Cv -m$mode1 c d > out || fail=1
-echo "removed \`d'
-\`c' -> \`d'" > out_installed_second_cd
+echo "removed 'd'
+'c' -> 'd'" > out_installed_second_cd
compare out out_installed_second_cd || fail=1
# destination file exists but content differs
echo test > a || framework_failure_
-echo "\`a' -> \`b'" > out_installed_first
-echo "removed \`b'
-\`a' -> \`b'" > out_installed_second
+echo "'a' -> 'b'" > out_installed_first
+echo "removed 'b'
+'a' -> 'b'" > out_installed_second
> out_empty
# destination file does not exist
echo test > a || framework_failure_
chcon -u system_u a || skip_ "chcon doesn't work"
-echo "\`a' -> \`b'" > out_installed_first
-echo "removed \`b'
-\`a' -> \`b'" > out_installed_second
+echo "'a' -> 'b'" > out_installed_first
+echo "removed 'b'
+'a' -> 'b'" > out_installed_second
> out_empty
# destination file does not exist
: # ok
else
fail=1
- echo "*** $i: bad exit status \`$status' (expected $expected)," 1>&2
+ echo "*** $i: bad exit status '$status' (expected $expected)," 1>&2
echo " with --help or --version output redirected to /dev/full" 1>&2
fi
fi
A basic test of touch -m has just failed, so the subsequent
tests in this file will not be run.
-In the output below, the date of last modification for \`a' should
+In the output below, the date of last modification for 'a' should
have been $t3.
EOF
#`
A fundamental touch -a test has just failed, so the subsequent
tests in this file will not be run.
-In the output below, the date of last access for \`a' should
+In the output below, the date of last access for 'a' should
have been $u1.
EOF
ls --full -lu a
dir=$d1/such-dir
truncate -s0 $dir > out 2>&1 && fail=1
cat <<EOF > exp
-truncate: cannot open \`$dir' for writing: No such file or directory
+truncate: cannot open '$dir' for writing: No such file or directory
EOF
compare exp out || fail=1
dir=$d1/
truncate -s0 $dir > out 2>&1 && fail=1
#The following can be returned at least
-#truncate: cannot open \`$dir' for writing: Not a directory
-#truncate: cannot open \`$dir' for writing: Is a directory
+#truncate: cannot open '$dir' for writing: Not a directory
+#truncate: cannot open '$dir' for writing: Is a directory
Exit $fail
{IN=>"a\na\nb\nc\nc\n"}, {OUT=>"\na\na\n\nc\nc\n"}],
['118', '--all-repeated=prepend', {IN=>"a\nb\n"}, {OUT=>""}],
['119', '--all-repeated=badoption', {IN=>"a\n"}, {OUT=>""}, {EXIT=>1},
- {ERR=>"$prog: invalid argument \`badoption' for \`--all-repeated'\n"
+ {ERR=>"$prog: invalid argument 'badoption' for '--all-repeated'\n"
. "Valid arguments are:\n"
- . " - \`none'\n"
- . " - \`prepend'\n"
- . " - \`separate'\n"
+ . " - 'none'\n"
+ . " - 'prepend'\n"
+ . " - 'separate'\n"
. $try}],
# Check that -d and -u suppress all output, as POSIX requires.
['120', qw(-d -u), {IN=>"a\na\n\b"}, {OUT=>""}],
require_selinux_enforcing_
c=invalid-selinux-context
-msg="failed to set default file creation context to \`$c':"
+msg="failed to set default file creation context to '$c':"
# Test each of mkdir, mknod, mkfifo with "-Z invalid-context".
rm -fr a d; touch a; mkdir d
$i --backup a a d/ 2>> out && fail=1
cat <<EOF > exp
-$i: warning: source file \`a' specified more than once
-$i: warning: source file \`a' specified more than once
-$i: will not overwrite just-created \`d/a' with \`a'
+$i: warning: source file 'a' specified more than once
+$i: warning: source file 'a' specified more than once
+$i: will not overwrite just-created 'd/a' with 'a'
EOF
compare exp out || fail=1
done
rm -fr a d; touch a; mkdir d
$i ./a a d/ 2>> out && fail=1
cat <<EOF > exp
-$i: cannot stat \`a': No such file or directory
-$i: cannot stat \`a': No such file or directory
+$i: cannot stat 'a': No such file or directory
+$i: cannot stat 'a': No such file or directory
EOF
compare exp out || fail=1
done
mv $ff $ff > out 2>&1 && fail=1
cat > exp <<EOF
-mv: \`$ff' and \`$ff' are the same file
+mv: '$ff' and '$ff' are the same file
EOF
compare exp out || fail=1
# Make sure out contains the prompt.
case "`cat out`" in
- "cp: try to overwrite \`f', overriding mode 0000 (---------)?"*) ;;
+ "cp: try to overwrite 'f', overriding mode 0000 (---------)?"*) ;;
*) fail=1 ;;
esac
{
local delay="$1"
case "`cat out`" in
- "mv: try to overwrite \`g', overriding mode 0000"*) ;;
+ "mv: try to overwrite 'g', overriding mode 0000"*) ;;
*) sleep $delay; return 1;;
esac
}
# test miscellaneous combinations of -f -i -n parameters
touch a b || framework_failure_
-echo "\`a' -> \`b'" > out_move
+echo "'a' -> 'b'" > out_move
> out_empty
# ask for overwrite, answer no
" out | sort > out2
cat <<EOF | sort > exp
-\`$null' -> \`XXX/$null'
-\`$dir' -> \`XXX/$dir'
-\`$dir/a' -> \`XXX/$dir/a'
-\`$dir/a/b' -> \`XXX/$dir/a/b'
-\`$dir/a/b/c' -> \`XXX/$dir/a/b/c'
-\`$dir/a/b/c/file1' -> \`XXX/$dir/a/b/c/file1'
-\`$dir/d' -> \`XXX/$dir/d'
-\`$dir/d/e' -> \`XXX/$dir/d/e'
-\`$dir/d/e/f' -> \`XXX/$dir/d/e/f'
-\`$dir/d/e/f/file2' -> \`XXX/$dir/d/e/f/file2'
+'$null' -> 'XXX/$null'
+'$dir' -> 'XXX/$dir'
+'$dir/a' -> 'XXX/$dir/a'
+'$dir/a/b' -> 'XXX/$dir/a/b'
+'$dir/a/b/c' -> 'XXX/$dir/a/b/c'
+'$dir/a/b/c/file1' -> 'XXX/$dir/a/b/c/file1'
+'$dir/d' -> 'XXX/$dir/d'
+'$dir/d/e' -> 'XXX/$dir/d/e'
+'$dir/d/e/f' -> 'XXX/$dir/d/e/f'
+'$dir/d/e/f/file2' -> 'XXX/$dir/d/e/f/file2'
EOF
compare exp out2 || fail=1
# On some (less-compliant) systems, we get EPERM in this case.
# Accept either diagnostic.
cat <<EOF > exp2
-mv: cannot move \`k' to \`$other_partition_tmpdir/k': Permission denied
+mv: cannot move 'k' to '$other_partition_tmpdir/k': Permission denied
EOF
if cmp out exp >/dev/null 2>&1; then
# Test for a cp-specific diagnostic introduced after coreutils-8.7:
printf '%s\n' \
- "cp: cannot create regular file \`no-such/': Not a directory" \
+ "cp: cannot create regular file 'no-such/': Not a directory" \
> expected-err
touch b
cp b no-such/ 2> err && fail=1
mv o2 out
sort <<EOF > exp || fail=1
-rm: descend into directory \`z'
-rm: remove regular empty file \`z/empty'
-rm: remove write-protected regular file \`z/fu'
-rm: remove write-protected regular empty file \`z/empty-u'
-rm: remove symbolic link \`z/slink'
-rm: remove symbolic link \`z/slinkdot'
-rm: remove directory \`z/d'
-rm: remove write-protected directory \`z/du'
-rm: remove directory \`z'
+rm: descend into directory 'z'
+rm: remove regular empty file 'z/empty'
+rm: remove write-protected regular file 'z/fu'
+rm: remove write-protected regular empty file 'z/empty-u'
+rm: remove symbolic link 'z/slink'
+rm: remove symbolic link 'z/slinkdot'
+rm: remove directory 'z/d'
+rm: remove write-protected directory 'z/du'
+rm: remove directory 'z'
EOF
compare exp out || fail=1
['unreadable-2', '-rf', $d,
{EXIT => $uid == 0 ? 0 : 1},
{ERR => $uid == 0 ? ''
- : "$prog: cannot remove \`$d': Permission denied\n"},
+ : "$prog: cannot remove '$d': Permission denied\n"},
{PRE => sub { (mkdir $d,0700 and mkdir "$d/x",0700 and chmod 0100,$d)
or die "$d: $!\n"}} ],
);
split -n l/1o 2>err && fail=1
compare exp err || fail=1
-echo "split: \`-': cannot determine file size" > exp
+echo "split: '-': cannot determine file size" > exp
echo | split -n l/1 2>err && fail=1
compare exp err || fail=1
touch $file > out 2>&1 && fail=1
cat <<EOF > exp
-touch: cannot touch \`$file': No such file or directory
+touch: cannot touch '$file': No such file or directory
EOF
compare exp out || fail=1
for msg in 'Not owner' 'Operation not permitted' 'Permission denied' \
'Read-only file system'; do
cat > exp <<EOF
-touch: setting times of \`/': $msg
+touch: setting times of '/': $msg
EOF
cmp out exp > /dev/null 2>&1 && { match=1; break; }