summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2015-11-01 18:53:26 +0000
committerPádraig Brady <P@draigBrady.com>2015-11-04 23:30:14 +0000
commit08e8fd7e38f2dae7c69c54eb22d508b6517e66e5 (patch)
tree63d021e305cd93bea445f9484fe8b3446dda2c3d /tests
parent1e8f9afac53a628dbc64e62bea53eb2da29c47fa (diff)
downloadcoreutils-08e8fd7e38f2dae7c69c54eb22d508b6517e66e5.tar.xz
all: avoid quoting file names when possible
Quote file names using the "shell-escape" or "shell-escape-always" methods, which quote as appropriate for most shells, and better support copy and paste of presented names. The "always" variant is used when the file name is embedded in an error message with surrounding spaces. * cfg.mk (sc_error_shell_quotes): A new syntax check rule to suggest quotef() where appropriate. (sc_error_shell_always_quotes): Likewise for quoteaf(). * src/system.h (quotef): A new define to apply shell quoting when needed. I.E. when shell character or ':' is present. (quoteaf): Likewise, but always quote. * src/*.c: Use quotef() and quoteaf() rather than quote() where appropriate. * tests/: Adjust accordingly.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/df/total-unprocessed.sh2
-rwxr-xr-xtests/du/files0-from-dir.sh4
-rwxr-xr-xtests/du/files0-from.pl8
-rwxr-xr-xtests/du/move-dir-while-traversing.sh2
-rwxr-xr-xtests/ln/hard-to-sym.sh4
-rwxr-xr-xtests/misc/dircolors.pl2
-rwxr-xr-xtests/misc/ls-misc.pl8
-rwxr-xr-xtests/misc/md5sum.pl10
-rwxr-xr-xtests/misc/readlink-fp-loop.sh6
-rwxr-xr-xtests/misc/sha1sum.pl6
-rwxr-xr-xtests/misc/shred-passes.sh64
-rwxr-xr-xtests/misc/sort-files0-from.pl6
-rwxr-xr-xtests/misc/sort.pl4
-rwxr-xr-xtests/misc/tsort.pl6
-rwxr-xr-xtests/misc/wc-files0-from.pl8
-rwxr-xr-xtests/rm/d-1.sh2
-rwxr-xr-xtests/rm/d-3.sh2
-rwxr-xr-xtests/rm/r-1.sh4
-rwxr-xr-xtests/rm/r-2.sh4
-rwxr-xr-xtests/rm/v-slash.sh2
-rwxr-xr-xtests/split/l-chunk.sh2
21 files changed, 78 insertions, 78 deletions
diff --git a/tests/df/total-unprocessed.sh b/tests/df/total-unprocessed.sh
index 9779471df..f15461dee 100755
--- a/tests/df/total-unprocessed.sh
+++ b/tests/df/total-unprocessed.sh
@@ -34,7 +34,7 @@ if test "$(df --output=fstype . | tail -n1)" != '-'; then
fi
cat <<\EOF > exp || framework_failure_
-df: '_does_not_exist_': No such file or directory
+df: _does_not_exist_: No such file or directory
EOF
# Ensure that df writes the error message also in the following case.
diff --git a/tests/du/files0-from-dir.sh b/tests/du/files0-from-dir.sh
index 4d7e90cf5..67b9f6231 100755
--- a/tests/du/files0-from-dir.sh
+++ b/tests/du/files0-from-dir.sh
@@ -29,10 +29,10 @@ cat dir > /dev/null && skip_ "cat dir/ succeeds"
for prog in du wc; do
$prog --files0-from=dir > /dev/null 2>err && fail=1
- printf "$prog: 'dir':\n" > exp || fail=1
+ printf "$prog: dir:\n" > exp || fail=1
# The diagnostic string is usually "Is a directory" (ENOTDIR),
# but accept a different string or errno value.
- sed "s/'dir':.*/'dir':/" err > k; mv k err
+ sed "s/dir:.*/dir:/" err > k; mv k err
compare exp err || fail=1
done
diff --git a/tests/du/files0-from.pl b/tests/du/files0-from.pl
index f0177a2d0..3854059f0 100755
--- a/tests/du/files0-from.pl
+++ b/tests/du/files0-from.pl
@@ -53,12 +53,12 @@ my @Tests =
# one NUL
['nul-1', '--files0-from=-', '<', {IN=>"\0"}, {EXIT=>1},
- {ERR => "$prog: '-':1: invalid zero-length file name\n"}],
+ {ERR => "$prog: -:1: invalid zero-length file name\n"}],
# two NULs
['nul-2', '--files0-from=-', '<', {IN=>"\0\0"}, {EXIT=>1},
- {ERR => "$prog: '-':1: invalid zero-length file name\n"
- . "$prog: '-':2: invalid zero-length file name\n"}],
+ {ERR => "$prog: -:1: invalid zero-length file name\n"
+ . "$prog: -:2: invalid zero-length file name\n"}],
# one file name, no NUL
['1', '--files0-from=-', '<',
@@ -84,7 +84,7 @@ my @Tests =
['zero-len', '--files0-from=-', '<',
{IN=>{f=>"\0g\0"}}, {AUX=>{g=>''}},
{OUT=>"0\tg\n"}, {OUT_SUBST=>'s/^\d+/0/'},
- {ERR => "$prog: '-':1: invalid zero-length file name\n"}, {EXIT=>1} ],
+ {ERR => "$prog: -:1: invalid zero-length file name\n"}, {EXIT=>1} ],
);
my $save_temps = $ENV{DEBUG};
diff --git a/tests/du/move-dir-while-traversing.sh b/tests/du/move-dir-while-traversing.sh
index 33db58e44..67bb34580 100755
--- a/tests/du/move-dir-while-traversing.sh
+++ b/tests/du/move-dir-while-traversing.sh
@@ -92,7 +92,7 @@ du -a $t d2 2> err
test $? = 1 || fail=1
# check for the new diagnostic
-printf "du: fts_read failed: '$t/3/a/b': No such file or directory\n" > exp \
+printf "du: fts_read failed: $t/3/a/b: No such file or directory\n" > exp \
|| fail=1
compare exp err || fail=1
diff --git a/tests/ln/hard-to-sym.sh b/tests/ln/hard-to-sym.sh
index edcee6600..0e63074a2 100755
--- a/tests/ln/hard-to-sym.sh
+++ b/tests/ln/hard-to-sym.sh
@@ -70,12 +70,12 @@ mkdir d || framework_failure_
ln -s d link-to-dir || framework_failure_
ln -L link-to-dir hard-to-dir-link 2>err && fail=1
case $(cat err) in
- *": 'link-to-dir': hard link not allowed for directory"*) ;;
+ *": link-to-dir: hard link not allowed for directory"*) ;;
*) fail=1 ;;
esac
ln -P link-to-dir/ hard-to-dir-link 2>err && fail=1
case $(cat err) in
- *": 'link-to-dir/': hard link not allowed for directory"*) ;;
+ *": link-to-dir/: hard link not allowed for directory"*) ;;
*) fail=1 ;;
esac
ln -P link-to-dir hard-to-dir-link || fail=1
diff --git a/tests/misc/dircolors.pl b/tests/misc/dircolors.pl
index 2ef6228de..2e6f27d88 100755
--- a/tests/misc/dircolors.pl
+++ b/tests/misc/dircolors.pl
@@ -26,7 +26,7 @@ use strict;
my @Tests =
(
['a', '-b', {IN => {k => "exec\n"}},
- {ERR => "dircolors: 'k':1: invalid line; missing second token\n"},
+ {ERR => "dircolors: k:1: invalid line; missing second token\n"},
{EXIT => 1}],
['quote', '-b', {IN => "exec 'echo Hello;:'\n"},
{OUT => "LS_COLORS='ex='\\''echo Hello;\\:'\\'':';\n"
diff --git a/tests/misc/ls-misc.pl b/tests/misc/ls-misc.pl
index f88c7a8ea..007e25787 100755
--- a/tests/misc/ls-misc.pl
+++ b/tests/misc/ls-misc.pl
@@ -235,7 +235,7 @@ my @Tests =
{POST => sub {unlink 'd/s' or die "d/s: $!\n";
rmdir 'd' or die "d: $!\n";
restore_ls_colors; }},
- {ERR => "ls: cannot access d/s: No such file or directory\n"},
+ {ERR => "ls: cannot access 'd/s': No such file or directory\n"},
{EXIT => 1}
],
# Related to the above fix, is this case where
@@ -289,7 +289,7 @@ my @Tests =
# From Stéphane Chazelas.
['no-a-isdir-b', 'no-dir d',
{OUT => "d:\n"},
- {ERR => "ls: cannot access no-dir: No such file or directory\n"},
+ {ERR => "ls: cannot access 'no-dir': No such file or directory\n"},
$mkdir, $rmdir, {EXIT => 2}],
['recursive-2', '-R d', {OUT => "d:\ne\n\nd/e:\n"}, $mkdir2, $rmdir2],
@@ -327,8 +327,8 @@ my @Tests =
# at least one of which is a nonempty directory.
['multi-arg-U1', '-U1 d no-such',
{OUT => "d:\nf\n"},
- {ERR_SUBST=>'s/ch:.*/ch:/'},
- {ERR => "$prog: cannot access no-such:\n"},
+ {ERR_SUBST=>"s/ch':.*/ch':/"},
+ {ERR => "$prog: cannot access 'no-such':\n"},
$mkdir_reg,
$rmdir_reg,
{EXIT => 2},
diff --git a/tests/misc/md5sum.pl b/tests/misc/md5sum.pl
index c99658213..ad1896d53 100755
--- a/tests/misc/md5sum.pl
+++ b/tests/misc/md5sum.pl
@@ -92,7 +92,7 @@ my @Tests =
. "invalid\n" }},
{AUX=> {f=> 'foo'}},
{OUT=>"f: FAILED\nf: FAILED\n"},
- {ERR=>"md5sum: 'f.md5': 3: "
+ {ERR=>"md5sum: f.md5: 3: "
. "improperly formatted MD5 checksum line\n"
. "md5sum: WARNING: 1 line is improperly formatted\n"
. "md5sum: WARNING: 2 computed checksums did NOT match\n"},
@@ -102,7 +102,7 @@ my @Tests =
# sha1sum accept BSD format.
['check-bsd', '--check', {IN=> {'f.sha1' => "SHA1 (f) = $degenerate\n"}},
{AUX=> {f=> ''}},
- {ERR=>"md5sum: 'f.sha1': no properly formatted "
+ {ERR=>"md5sum: f.sha1: no properly formatted "
. "MD5 checksum lines found\n"},
{EXIT=> 1}],
['check-bsd2', '--check', {IN=> {'f.md5' => "MD5 (f) = $degenerate\n"}},
@@ -112,7 +112,7 @@ my @Tests =
{AUX=> {f=> 'bar'}}, {EXIT=> 1}],
['check-openssl', '--check', {IN=> {'f.sha1' => "SHA1(f)= $degenerate\n"}},
{AUX=> {f=> ''}},
- {ERR=>"md5sum: 'f.sha1': no properly formatted "
+ {ERR=>"md5sum: f.sha1: no properly formatted "
. "MD5 checksum lines found\n"},
{EXIT=> 1}],
['check-openssl2', '--check', {IN=> {'f.md5' => "MD5(f)= $degenerate\n"}},
@@ -121,7 +121,7 @@ my @Tests =
{IN=> {'f.md5' => "MD5(f)= $degenerate\n"}},
{AUX=> {f=> 'bar'}}, {EXIT=> 1}],
['bsd-segv', '--check', {IN=> {'z' => "MD5 ("}}, {EXIT=> 1},
- {ERR=> "$prog: 'z': no properly formatted MD5 checksum lines found\n"}],
+ {ERR=> "$prog: z: no properly formatted MD5 checksum lines found\n"}],
# Ensure that when there's a NUL byte among the checksum hex digits
# we detect the invalid formatting and don't even open the file.
@@ -129,7 +129,7 @@ my @Tests =
# h: FAILED
# md5sum: WARNING: 1 of 1 computed checksum did NOT match
['nul-in-cksum', '--check', {IN=> {'h'=>("\0"x32)." h\n"}}, {EXIT=> 1},
- {ERR=> "$prog: 'h': no properly formatted MD5 checksum lines found\n"}],
+ {ERR=> "$prog: h: no properly formatted MD5 checksum lines found\n"}],
);
# Insert the '--text' argument for each test.
diff --git a/tests/misc/readlink-fp-loop.sh b/tests/misc/readlink-fp-loop.sh
index d3e1a1eaf..50ada55e8 100755
--- a/tests/misc/readlink-fp-loop.sh
+++ b/tests/misc/readlink-fp-loop.sh
@@ -42,10 +42,10 @@ ln -sf ../s/1 d/2 || framework_failure_
readlink -v -e p/1 2> out && fail=1
readlink_msg=$(cat out)
case $readlink_msg in
- "readlink: 'p/1': "*) ;;
+ "readlink: p/1: "*) ;;
*) fail=1;;
esac
-symlink_loop_msg=${readlink_msg#"readlink: 'p/1': "}
+symlink_loop_msg=${readlink_msg#"readlink: p/1: "}
# Exercise the hash table code.
ln -nsf ../s/3 d/2 || framework_failure_
@@ -62,7 +62,7 @@ compare exp out || fail=1
# A trivial loop
ln -s loop loop
readlink -v -e loop 2> out && fail=1
-echo "readlink: 'loop': $symlink_loop_msg" > exp || framework_failure_
+echo "readlink: loop: $symlink_loop_msg" > exp || framework_failure_
compare exp out || fail=1
Exit $fail
diff --git a/tests/misc/sha1sum.pl b/tests/misc/sha1sum.pl
index b58a7f4a1..de923b636 100755
--- a/tests/misc/sha1sum.pl
+++ b/tests/misc/sha1sum.pl
@@ -53,7 +53,7 @@ my @Tests =
# md5sum accept BSD format.
['check-bsd', '--check', {IN=> {'f.md5' => "MD5 (f) = $sha_degenerate\n"}},
{AUX=> {f=> ''}},
- {ERR=>"sha1sum: 'f.md5': no properly formatted "
+ {ERR=>"sha1sum: f.md5: no properly formatted "
. "SHA1 checksum lines found\n"},
{EXIT=> 1}],
['check-bsd2', '--check',
@@ -65,7 +65,7 @@ my @Tests =
['check-openssl', '--check',
{IN=> {'f.md5' => "MD5(f)= $sha_degenerate\n"}},
{AUX=> {f=> ''}},
- {ERR=>"sha1sum: 'f.md5': no properly formatted "
+ {ERR=>"sha1sum: f.md5: no properly formatted "
. "SHA1 checksum lines found\n"},
{EXIT=> 1}],
['check-openssl2', '--check',
@@ -75,7 +75,7 @@ my @Tests =
{IN=> {'f.sha1' => "SHA1(f)= $sha_degenerate\n"}},
{AUX=> {f=> 'bar'}}, {EXIT=> 1}],
['bsd-segv', '--check', {IN=> {'z' => "SHA1 ("}}, {EXIT=> 1},
- {ERR=> "$prog: 'z': no properly formatted SHA1 checksum lines found\n"}],
+ {ERR=> "$prog: z: no properly formatted SHA1 checksum lines found\n"}],
);
# Insert the '--text' argument for each test.
diff --git a/tests/misc/shred-passes.sh b/tests/misc/shred-passes.sh
index ddf788b05..64216fd8a 100755
--- a/tests/misc/shred-passes.sh
+++ b/tests/misc/shred-passes.sh
@@ -24,12 +24,12 @@ print_ver_ shred
# 3 random passes and a single rename.
printf 1 > f || framework_failure_
echo "\
-shred: 'f': pass 1/3 (random)...
-shred: 'f': pass 2/3 (random)...
-shred: 'f': pass 3/3 (random)...
-shred: 'f': removing
-shred: 'f': renamed to 0
-shred: 'f': removed" > exp || framework_failure_
+shred: f: pass 1/3 (random)...
+shred: f: pass 2/3 (random)...
+shred: f: pass 3/3 (random)...
+shred: f: removing
+shred: f: renamed to 0
+shred: f: removed" > exp || framework_failure_
shred -v -u f 2>out || fail=1
compare exp out || fail=1
@@ -39,9 +39,9 @@ compare exp out || fail=1
# to bypass the data passes
touch f || framework_failure_
echo "\
-shred: 'f': removing
-shred: 'f': renamed to 0
-shred: 'f': removed" > exp || framework_failure_
+shred: f: removing
+shred: f: renamed to 0
+shred: f: removed" > exp || framework_failure_
shred -v -u f 2>out || fail=1
compare exp out || fail=1
@@ -52,29 +52,29 @@ compare exp out || fail=1
dd bs=100K count=1 if=/dev/zero | tr '\0' 'U' > Us || framework_failure_
printf 1 > f || framework_failure_
echo "\
-shred: 'f': pass 1/20 (random)...
-shred: 'f': pass 2/20 (ffffff)...
-shred: 'f': pass 3/20 (924924)...
-shred: 'f': pass 4/20 (888888)...
-shred: 'f': pass 5/20 (db6db6)...
-shred: 'f': pass 6/20 (777777)...
-shred: 'f': pass 7/20 (492492)...
-shred: 'f': pass 8/20 (bbbbbb)...
-shred: 'f': pass 9/20 (555555)...
-shred: 'f': pass 10/20 (aaaaaa)...
-shred: 'f': pass 11/20 (random)...
-shred: 'f': pass 12/20 (6db6db)...
-shred: 'f': pass 13/20 (249249)...
-shred: 'f': pass 14/20 (999999)...
-shred: 'f': pass 15/20 (111111)...
-shred: 'f': pass 16/20 (000000)...
-shred: 'f': pass 17/20 (b6db6d)...
-shred: 'f': pass 18/20 (eeeeee)...
-shred: 'f': pass 19/20 (333333)...
-shred: 'f': pass 20/20 (random)...
-shred: 'f': removing
-shred: 'f': renamed to 0
-shred: 'f': removed" > exp || framework_failure_
+shred: f: pass 1/20 (random)...
+shred: f: pass 2/20 (ffffff)...
+shred: f: pass 3/20 (924924)...
+shred: f: pass 4/20 (888888)...
+shred: f: pass 5/20 (db6db6)...
+shred: f: pass 6/20 (777777)...
+shred: f: pass 7/20 (492492)...
+shred: f: pass 8/20 (bbbbbb)...
+shred: f: pass 9/20 (555555)...
+shred: f: pass 10/20 (aaaaaa)...
+shred: f: pass 11/20 (random)...
+shred: f: pass 12/20 (6db6db)...
+shred: f: pass 13/20 (249249)...
+shred: f: pass 14/20 (999999)...
+shred: f: pass 15/20 (111111)...
+shred: f: pass 16/20 (000000)...
+shred: f: pass 17/20 (b6db6d)...
+shred: f: pass 18/20 (eeeeee)...
+shred: f: pass 19/20 (333333)...
+shred: f: pass 20/20 (random)...
+shred: f: removing
+shred: f: renamed to 0
+shred: f: removed" > exp || framework_failure_
shred -v -u -n20 --random-source=Us f 2>out || fail=1
compare exp out || fail=1
diff --git a/tests/misc/sort-files0-from.pl b/tests/misc/sort-files0-from.pl
index 6773309d1..63c5bb3e4 100755
--- a/tests/misc/sort-files0-from.pl
+++ b/tests/misc/sort-files0-from.pl
@@ -55,14 +55,14 @@ my @Tests =
# one NUL
['nul-1', '--files0-from=-', '<', {IN=>"\0"}, {EXIT=>2},
- {ERR => "$prog: '-':1: invalid zero-length file name\n"}],
+ {ERR => "$prog: -:1: invalid zero-length file name\n"}],
# two NULs
# Note that the behavior here differs from 'wc' in that the
# first zero-length file name is treated as fatal, so there
# is only one line of diagnostic output.
['nul-2', '--files0-from=-', '<', {IN=>"\0\0"}, {EXIT=>2},
- {ERR => "$prog: '-':1: invalid zero-length file name\n"}],
+ {ERR => "$prog: -:1: invalid zero-length file name\n"}],
# one file name, no NUL
['1', '--files0-from=-', '<',
@@ -86,7 +86,7 @@ my @Tests =
# should be no output on STDOUT.
['zero-len', '--files0-from=-', '<',
{IN=>{f=>"\0g\0"}}, {AUX=>{g=>''}},
- {ERR => "$prog: '-':1: invalid zero-length file name\n"}, {EXIT=>2} ],
+ {ERR => "$prog: -:1: invalid zero-length file name\n"}, {EXIT=>2} ],
);
my $save_temps = $ENV{DEBUG};
diff --git a/tests/misc/sort.pl b/tests/misc/sort.pl
index 012d8b94e..f6a222c2c 100755
--- a/tests/misc/sort.pl
+++ b/tests/misc/sort.pl
@@ -33,7 +33,7 @@ my $mb_locale = $ENV{LOCALE_FR_UTF8};
# Normalize each diagnostic to use '-'.
my $normalize_filename = {ERR_SUBST => 's/^$prog: .*?:/$prog: -:/'};
-my $no_file = "$prog: cannot read: 'no-file': No such file or directory\n";
+my $no_file = "$prog: cannot read: no-file: No such file or directory\n";
my @Tests =
(
@@ -327,7 +327,7 @@ my @Tests =
["o-no-file1", qw(-o no-file no-file), {EXIT=>2}, {ERR=>$no_file}],
["create-empty", qw(-o no/such/file /dev/null), {EXIT=>2},
- {ERR=>"$prog: open failed: 'no/such/file': No such file or directory\n"}],
+ {ERR=>"$prog: open failed: no/such/file: No such file or directory\n"}],
# From Paul Eggert. This was fixed in textutils-1.22k.
["neg-nls", '-n', {IN=>"-1\n-9\n"}, {OUT=>"-9\n-1\n"}],
diff --git a/tests/misc/tsort.pl b/tests/misc/tsort.pl
index 60f22c43c..4d04866ad 100755
--- a/tests/misc/tsort.pl
+++ b/tests/misc/tsort.pl
@@ -27,10 +27,10 @@ my @Tests =
(
['cycle-1', {IN => {f => "t b\nt s\ns t\n"}}, {OUT => "s\nt\nb\n"},
{EXIT => 1},
- {ERR => "tsort: 'f': input contains a loop:\ntsort: s\ntsort: t\n"} ],
+ {ERR => "tsort: f: input contains a loop:\ntsort: s\ntsort: t\n"} ],
['cycle-2', {IN => {f => "t x\nt s\ns t\n"}}, {OUT => "s\nt\nx\n"},
{EXIT => 1},
- {ERR => "tsort: 'f': input contains a loop:\ntsort: s\ntsort: t\n"} ],
+ {ERR => "tsort: f: input contains a loop:\ntsort: s\ntsort: t\n"} ],
['posix-1', {IN => "a b c c d e\ng g\nf g e f\nh h\n"},
{OUT => "a\nc\nd\nh\nb\ne\nf\ng\n"}],
@@ -50,7 +50,7 @@ my @Tests =
# copy of the final token were appended.
['odd', {IN => "a\n"},
{EXIT => 1},
- {ERR => "tsort: 'odd.1': input contains an odd number of tokens\n"}],
+ {ERR => "tsort: odd.1: input contains an odd number of tokens\n"}],
['only-one', {IN => {f => ""}}, {IN => {g => ""}},
{EXIT => 1},
diff --git a/tests/misc/wc-files0-from.pl b/tests/misc/wc-files0-from.pl
index 519587be6..cae3fc225 100755
--- a/tests/misc/wc-files0-from.pl
+++ b/tests/misc/wc-files0-from.pl
@@ -53,13 +53,13 @@ my @Tests =
# one NUL
['nul-1', '--files0-from=-', '<', {IN=>"\0"}, {EXIT=>1},
- {ERR => "$prog: '-':1: invalid zero-length file name\n"}],
+ {ERR => "$prog: -:1: invalid zero-length file name\n"}],
# two NULs
['nul-2', '--files0-from=-', '<', {IN=>"\0\0"}, {EXIT=>1},
{OUT=>"0 0 0 total\n"},
- {ERR => "$prog: '-':1: invalid zero-length file name\n"
- . "$prog: '-':2: invalid zero-length file name\n"}],
+ {ERR => "$prog: -:1: invalid zero-length file name\n"
+ . "$prog: -:2: invalid zero-length file name\n"}],
# one file name, no NUL
['1', '--files0-from=-', '<',
@@ -83,7 +83,7 @@ my @Tests =
['zero-len', '--files0-from=-', '<',
{IN=>{f=>"\0g\0"}}, {AUX=>{g=>''}},
{OUT=>"0 0 0 g\n0 0 0 total\n"},
- {ERR => "$prog: '-':1: invalid zero-length file name\n"}, {EXIT=>1} ],
+ {ERR => "$prog: -:1: invalid zero-length file name\n"}, {EXIT=>1} ],
);
my $save_temps = $ENV{DEBUG};
diff --git a/tests/rm/d-1.sh b/tests/rm/d-1.sh
index 43b753ebc..bde8c695c 100755
--- a/tests/rm/d-1.sh
+++ b/tests/rm/d-1.sh
@@ -25,7 +25,7 @@ mkdir a || framework_failure_
rm --verbose --dir a b > out || fail=1
cat <<\EOF > exp || framework_failure_
-removed directory: 'a'
+removed directory 'a'
removed 'b'
EOF
diff --git a/tests/rm/d-3.sh b/tests/rm/d-3.sh
index af39da38b..1200ca459 100755
--- a/tests/rm/d-3.sh
+++ b/tests/rm/d-3.sh
@@ -28,7 +28,7 @@ printf "%s" \
> exp.err || framework_failure_
printf "%s\n" \
- "removed directory: 'd'" \
+ "removed directory 'd'" \
> exp || framework_failure_
compare exp out || fail=1
diff --git a/tests/rm/r-1.sh b/tests/rm/r-1.sh
index 21564c6a5..2a14110a3 100755
--- a/tests/rm/r-1.sh
+++ b/tests/rm/r-1.sh
@@ -23,8 +23,8 @@ mkdir a a/a || framework_failure_
> b || framework_failure_
cat <<\EOF > exp || framework_failure_
-removed directory: 'a/a'
-removed directory: 'a'
+removed directory 'a/a'
+removed directory 'a'
removed 'b'
EOF
diff --git a/tests/rm/r-2.sh b/tests/rm/r-2.sh
index a99bdbf4b..a6616f648 100755
--- a/tests/rm/r-2.sh
+++ b/tests/rm/r-2.sh
@@ -25,8 +25,8 @@ mkdir t t/a t/a/b || framework_failure_
# FIXME: if this fails, it's a framework failure
cat <<\EOF | sort > t/E || framework_failure_
-removed directory: 't/a'
-removed directory: 't/a/b'
+removed directory 't/a'
+removed directory 't/a/b'
removed 't/a/b/g'
removed 't/a/f'
EOF
diff --git a/tests/rm/v-slash.sh b/tests/rm/v-slash.sh
index 5cabb0bc6..5a5d401d5 100755
--- a/tests/rm/v-slash.sh
+++ b/tests/rm/v-slash.sh
@@ -26,7 +26,7 @@ touch a/x || framework_failure_
rm --verbose -r a/// > out || fail=1
cat <<\EOF > exp || fail=1
removed 'a/x'
-removed directory: 'a/'
+removed directory 'a/'
EOF
compare exp out || fail=1
diff --git a/tests/split/l-chunk.sh b/tests/split/l-chunk.sh
index c97b3b562..c4e55685b 100755
--- a/tests/split/l-chunk.sh
+++ b/tests/split/l-chunk.sh
@@ -24,7 +24,7 @@ echo "split: invalid number of chunks: '1o'" > exp
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