diff options
author | Jim Meyering <meyering@redhat.com> | 2012-01-07 20:55:10 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2012-01-09 21:50:08 +0100 |
commit | ae2b0d2ddca458eb282bb0458987e75e1875a659 (patch) | |
tree | de928bfafb577a20963be45b4b6d97488c0b5e24 /tests/misc | |
parent | dd0e4c5621ca2fa9255aef4eee0e7cf41cd335d2 (diff) | |
download | coreutils-ae2b0d2ddca458eb282bb0458987e75e1875a659.tar.xz |
tests: more automated quote adjustment
Relax initial regexp to match more instances, but add a
filter to avoid some invalid conversions. Run this:
git grep -l "\`[^']*'" tests | xargs perl -pi -e '$q=q"'\''";' \
-e '$q="$q\\$q$q"; /(= ?\`|\`expr|\`echo|\Q$q\E)/ and next;' \
-e ' s/\`([^'\''"]*?'\'')/'\''$1/g'
The last disjunct in the above (...) filter is to exempt
any line that contains this string: '\''
With quoting like that, converting a ` to ' is likely to cause trouble,
so we'll handle those manually. Here are three examples where
the exemption is required:
*': `link-to-dir/'\'': hard link not allowed for directory'*) ;;
printf 'creating file `%s'\''\n' $f
'mv: inter-device move failed: `%s'\'' to `%s'\'';'\
Diffstat (limited to 'tests/misc')
-rwxr-xr-x | tests/misc/basename | 2 | ||||
-rwxr-xr-x | tests/misc/cat-proc | 2 | ||||
-rwxr-xr-x | tests/misc/comm | 6 | ||||
-rwxr-xr-x | tests/misc/date-sec | 2 | ||||
-rwxr-xr-x | tests/misc/dirname | 2 | ||||
-rwxr-xr-x | tests/misc/factor | 2 | ||||
-rwxr-xr-x | tests/misc/fmt | 8 | ||||
-rwxr-xr-x | tests/misc/join | 2 | ||||
-rwxr-xr-x | tests/misc/mktemp | 18 | ||||
-rwxr-xr-x | tests/misc/nohup | 4 | ||||
-rwxr-xr-x | tests/misc/od | 2 | ||||
-rwxr-xr-x | tests/misc/printf-cov | 2 | ||||
-rwxr-xr-x | tests/misc/seq | 10 | ||||
-rwxr-xr-x | tests/misc/sha1sum-vec | 4 | ||||
-rwxr-xr-x | tests/misc/sort | 26 | ||||
-rwxr-xr-x | tests/misc/sort-compress | 2 | ||||
-rwxr-xr-x | tests/misc/sort-files0-from | 6 | ||||
-rwxr-xr-x | tests/misc/sort-merge | 12 | ||||
-rwxr-xr-x | tests/misc/stdbuf | 2 | ||||
-rwxr-xr-x | tests/misc/tac | 2 | ||||
-rwxr-xr-x | tests/misc/tail | 4 | ||||
-rwxr-xr-x | tests/misc/test | 2 | ||||
-rwxr-xr-x | tests/misc/test-diag | 2 | ||||
-rwxr-xr-x | tests/misc/timeout | 2 | ||||
-rwxr-xr-x | tests/misc/tr | 6 | ||||
-rwxr-xr-x | tests/misc/tsort | 2 | ||||
-rwxr-xr-x | tests/misc/tty-eof | 2 | ||||
-rwxr-xr-x | tests/misc/wc-files0-from | 4 | ||||
-rwxr-xr-x | tests/misc/xstrtol | 2 |
29 files changed, 71 insertions, 71 deletions
diff --git a/tests/misc/basename b/tests/misc/basename index 349aac8f5..fefe58c79 100755 --- a/tests/misc/basename +++ b/tests/misc/basename @@ -34,7 +34,7 @@ my @Tests = ( ['fail-1', {ERR => "$prog: missing operand\n" . "Try '$prog --help' for more information.\n"}, {EXIT => '1'}], - ['fail-2', qw(a b c), {ERR => "$prog: extra operand `c'\n" + ['fail-2', qw(a b c), {ERR => "$prog: extra operand 'c'\n" . "Try '$prog --help' for more information.\n"}, {EXIT => '1'}], ['a', qw(d/f), {OUT => 'f'}], diff --git a/tests/misc/cat-proc b/tests/misc/cat-proc index 99e064bf9..082c727e0 100755 --- a/tests/misc/cat-proc +++ b/tests/misc/cat-proc @@ -1,5 +1,5 @@ #!/bin/sh -# Ensure that cat -E produces same output as cat, module `$'s, +# Ensure that cat -E produces same output as cat, module '$'s, # even when applied to a file in /proc. # Copyright (C) 2006-2012 Free Software Foundation, Inc. diff --git a/tests/misc/comm b/tests/misc/comm index c727f80fc..905b5f862 100755 --- a/tests/misc/comm +++ b/tests/misc/comm @@ -57,7 +57,7 @@ my @Tests = # invalid missing command line argument (1) ['missing-arg1', $inputs[0], {EXIT=>1}, - {ERR => "$prog: missing operand after `a'\n" + {ERR => "$prog: missing operand after 'a'\n" . "Try '$prog --help' for more information.\n"}], # invalid missing command line argument (both) @@ -67,7 +67,7 @@ my @Tests = # invalid extra command line argument ['extra-arg', @inputs, 'no-such', {EXIT=>1}, - {ERR => "$prog: extra operand `no-such'\n" + {ERR => "$prog: extra operand 'no-such'\n" . "Try '$prog --help' for more information.\n"}], # out-of-order input @@ -133,7 +133,7 @@ my @Tests = # invalid empty delimiter ['delim-empty', '--output-delimiter=', @inputs, {EXIT=>1}, - {ERR => "$prog: empty `--output-delimiter' not allowed\n"}], + {ERR => "$prog: empty '--output-delimiter' not allowed\n"}], # invalid dual delimiter ['delim-dual', '--output-delimiter=,', '--output-delimiter=+', diff --git a/tests/misc/date-sec b/tests/misc/date-sec index b36b6759f..32463cf39 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, 2006, 2008-2012 Free Software Foundation, Inc. diff --git a/tests/misc/dirname b/tests/misc/dirname index 67a374ede..37cf7cf18 100755 --- a/tests/misc/dirname +++ b/tests/misc/dirname @@ -35,7 +35,7 @@ my @Tests = ( ['fail-1', {ERR => "$prog: missing operand\n" . "Try '$prog --help' for more information.\n"}, {EXIT => '1'}], - ['fail-2', qw(a b), {ERR => "$prog: extra operand `b'\n" + ['fail-2', qw(a b), {ERR => "$prog: extra operand 'b'\n" . "Try '$prog --help' for more information.\n"}, {EXIT => '1'}], ['a', qw(d/f), {OUT => 'd'}], diff --git a/tests/misc/factor b/tests/misc/factor index d5565d66c..97da9c474 100755 --- a/tests/misc/factor +++ b/tests/misc/factor @@ -63,7 +63,7 @@ my @Tests = {EXIT => 1}], ['cont', 'a 4', {OUT => "4: 2 2\n"}, - {ERR => "$prog: `a' is not a valid positive integer\n"}, + {ERR => "$prog: 'a' is not a valid positive integer\n"}, {EXIT => 1}], ); diff --git a/tests/misc/fmt b/tests/misc/fmt index ef10e8274..e94d6134e 100755 --- a/tests/misc/fmt +++ b/tests/misc/fmt @@ -26,13 +26,13 @@ my @Tests = {IN=> "ça\nçb\n"}, {OUT=>"ça b\n"}], ['wide-1', '-w 32768', - {ERR => "fmt: invalid width: `32768'\n"}, {EXIT => 1}], + {ERR => "fmt: invalid width: '32768'\n"}, {EXIT => 1}], ['wide-2', '-w 2147483647', - {ERR => "fmt: invalid width: `2147483647'\n"}, {EXIT => 1}], + {ERR => "fmt: invalid width: '2147483647'\n"}, {EXIT => 1}], ['bad-suffix', '-72x', {IN=> ''}, - {ERR => "fmt: invalid width: `72x'\n"}, {EXIT => 1}], + {ERR => "fmt: invalid width: '72x'\n"}, {EXIT => 1}], ['no-file', 'no-such-file', - {ERR => "fmt: cannot open `no-such-file' for reading:" + {ERR => "fmt: cannot open 'no-such-file' for reading:" . " No such file or directory\n"}, {EXIT => 1}], ['obs-1', '-c -72', {ERR => "fmt: invalid option -- 7; -WIDTH is recognized only when it" diff --git a/tests/misc/join b/tests/misc/join index 8fa099464..a3fd1a8fa 100755 --- a/tests/misc/join +++ b/tests/misc/join @@ -173,7 +173,7 @@ my @tv = ( # FIXME: change this to ensure the diagnostic makes sense ['invalid-j', '-j x', {}, "", 1, - "$prog: invalid field number: `x'\n"], + "$prog: invalid field number: 'x'\n"], # With ordering check, inputs in order ['chkodr-1', '--check-order', diff --git a/tests/misc/mktemp b/tests/misc/mktemp index 40bbe5100..c6291fbb6 100755 --- a/tests/misc/mktemp +++ b/tests/misc/mktemp @@ -61,7 +61,7 @@ my @Tests = ['too-many-q', '-q a b', {EXIT => 1} ], ['too-few-x', 'foo.XX', {EXIT => 1}, - {ERR=>"$prog: too few X's in template `foo.XX'\n"}], + {ERR=>"$prog: too few X's in template 'foo.XX'\n"}], ['too-few-xq', '-q foo.XX', {EXIT => 1} ], ['1f', 'bar.XXXX', {OUT => "bar.ZZZZ\n"}, @@ -103,11 +103,11 @@ my @Tests = # Test bad templates ['invalid-tl', '-t a/bXXXX', - {ERR=>"$prog: invalid template, `a/bXXXX', " + {ERR=>"$prog: invalid template, 'a/bXXXX', " . "contains directory separator\n"}, {EXIT => 1} ], ['invalid-t2', '--tmpdir=a /bXXXX', - {ERR=>"$prog: invalid template, `/bXXXX'; " + {ERR=>"$prog: invalid template, '/bXXXX'; " . "with --tmpdir, it may not be absolute\n"}, {EXIT => 1} ], # Suffix after X. @@ -144,17 +144,17 @@ my @Tests = check_tmp $f, 'F'; }}], ['suffix5f', '--suffix /b aXXXX', {EXIT=>1}, - {ERR=>"$prog: invalid suffix `/b', contains directory separator\n"}], + {ERR=>"$prog: invalid suffix '/b', contains directory separator\n"}], ['suffix6f', 'aXXXX/b', {EXIT=>1}, - {ERR=>"$prog: invalid suffix `/b', contains directory separator\n"}], + {ERR=>"$prog: invalid suffix '/b', contains directory separator\n"}], ['suffix6f-q', '-q aXXXX/b', {EXIT=>1}], ['suffix7f', '--suffix= aXXXXb', {EXIT=>1}, - {ERR=>"$prog: with --suffix, template `aXXXXb' must end in X\n"}], + {ERR=>"$prog: with --suffix, template 'aXXXXb' must end in X\n"}], ['suffix7f-q', '-q --suffix= aXXXXb', {EXIT=>1}], ['suffix7d', '-d --suffix=aXXXXb ""', {EXIT=>1}, - {ERR=>"$prog: with --suffix, template `' must end in X\n"}], + {ERR=>"$prog: with --suffix, template '' must end in X\n"}], ['suffix8f', 'aXXXX --suffix=b', {OUT=>"aZZZZb\n"}, {OUT_SUBST=>'s,^a....,aZZZZ,'}, @@ -167,9 +167,9 @@ my @Tests = . "Try '$prog --help' for more information.\n"}], ['suffix10f', 'aXXb', {EXIT => 1}, - {ERR=>"$prog: too few X's in template `aXXb'\n"}], + {ERR=>"$prog: too few X's in template 'aXXb'\n"}], ['suffix10d', '-d --suffix=X aXX', {EXIT => 1}, - {ERR=>"$prog: too few X's in template `aXXX'\n"}], + {ERR=>"$prog: too few X's in template 'aXXX'\n"}], ['suffix11f', '--suffix=.txt', {OUT=>"./tmp.ZZZZZZZZZZ.txt\n"}, {ENV=>"TMPDIR=."}, diff --git a/tests/misc/nohup b/tests/misc/nohup index e20a22c70..0fa1f3dc0 100755 --- a/tests/misc/nohup +++ b/tests/misc/nohup @@ -50,9 +50,9 @@ rm -f nohup.out err exp # change depending on whether stderr is redirected. nohup sh -c 'echo stdout; echo stderr 1>&2' >out || fail=1 if test -t 2; then - test "`cat out|tr '\n' -`" = stdout-stderr- || fail=1 + test "'cat out|tr '\n' -`" = stdout-stderr- || fail=1 else - test "`cat out|tr '\n' -`" = stdout- || fail=1 + test "'cat out|tr '\n' -`" = stdout- || fail=1 fi # It must *not* exist. test -f nohup.out && fail=1 diff --git a/tests/misc/od b/tests/misc/od index 75ff2f159..46d4601d6 100755 --- a/tests/misc/od +++ b/tests/misc/od @@ -32,7 +32,7 @@ my $proc_file = '/proc/version'; # Count the bytes in $proc_file, _by reading_. my $len = 0; open FH, '<', $proc_file - or die "$program_name: can't open `$proc_file' for reading: $!\n"; + or die "$program_name: can't open '$proc_file' for reading: $!\n"; while (defined (my $line = <FH>)) { $len += length $line; diff --git a/tests/misc/printf-cov b/tests/misc/printf-cov index c3a6861d6..64f2d95bb 100755 --- a/tests/misc/printf-cov +++ b/tests/misc/printf-cov @@ -83,7 +83,7 @@ my @Tests = {OUT=>"inaccurate"}, {OUT_SUBST => 's/\d+/inaccurate/'}, {ERR=>"$prog: 9...9\n"}, {ERR_SUBST => 's/9+.*/9...9/'}], ['excess', 'B 1', {OUT=>'B'}, - {ERR=>"$prog: warning: ignoring excess arguments, starting with `1'\n"}], + {ERR=>"$prog: warning: ignoring excess arguments, starting with '1'\n"}], ['percent', '%%', {OUT=>'%'}], ['d-sp', q('% d' 33), {OUT=>' 33'}], ['d-plus', q('%+d' 33), {OUT=>'+33'}], diff --git a/tests/misc/seq b/tests/misc/seq index 05770b0da..3ea869f62 100755 --- a/tests/misc/seq +++ b/tests/misc/seq @@ -82,20 +82,20 @@ my @Tests = # In coreutils-[6.0..6.9], this would mistakenly succeed and print "%Lg". ['fmt-c', qw(-f %%g 1), {EXIT => 1}, - {ERR => "seq: format `%%g' has no % directive\n"}], + {ERR => "seq: format '%%g' has no % directive\n"}], # In coreutils-6.9..6.10, this would fail with an erroneous diagnostic: # "seq: memory exhausted". In coreutils-6.0..6.8, it would mistakenly # succeed and print a blank line. ['fmt-eos1', qw(-f % 1), {EXIT => 1}, - {ERR => "seq: format `%' ends in %\n"}], + {ERR => "seq: format '%' ends in %\n"}], ['fmt-eos2', qw(-f %g% 1), {EXIT => 1}, - {ERR => "seq: format `%g%' has too many % directives\n"}], + {ERR => "seq: format '%g%' has too many % directives\n"}], ['fmt-d', qw(-f "" 1), {EXIT => 1}, - {ERR => "seq: format `' has no % directive\n"}], + {ERR => "seq: format '' has no % directive\n"}], ['fmt-e', qw(-f %g%g 1), {EXIT => 1}, - {ERR => "seq: format `%g%g' has too many % directives\n"}], + {ERR => "seq: format '%g%g' has too many % directives\n"}], # With coreutils-6.12 and earlier, with a UTF8 numeric locale that uses # something other than "." as the decimal point, this use of seq would diff --git a/tests/misc/sha1sum-vec b/tests/misc/sha1sum-vec index 4c7c06afd..d7b5e0d8e 100755 --- a/tests/misc/sha1sum-vec +++ b/tests/misc/sha1sum-vec @@ -495,8 +495,8 @@ sub binary_expand ($$) defined $n && defined $b or die "$test_name: too few args\n"; my @a = split ' ', $rest, $n + 1; my $caret = pop @a; - $caret eq '^' or die "test $test_name: @a missing `^'\n"; - $b eq '1' || $b eq '0' or die "test $test_name: bad `b'=$b\n"; + $caret eq '^' or die "test $test_name: @a missing '^'\n"; + $b eq '1' || $b eq '0' or die "test $test_name: bad 'b'=$b\n"; my $n_bad = @a; @a == $n or die "test $test_name: wrong number of args (expected $n, found $n_bad)\n"; diff --git a/tests/misc/sort b/tests/misc/sort index ea27faa25..5be00a017 100755 --- a/tests/misc/sort +++ b/tests/misc/sort @@ -71,7 +71,7 @@ my @Tests = ["h6", '-h', {IN=>"1GiB\n1030MiB\n"}, {OUT=>"1030MiB\n1GiB\n"}], # check option incompatibility ["h7", '-hn', {IN=>""}, {OUT=>""}, {EXIT=>2}, - {ERR=>"$prog: options `-hn' are incompatible\n"}], + {ERR=>"$prog: options '-hn' are incompatible\n"}], # check key processing ["h8", '-n -k2,2h', {IN=>"1 1E\n2 2M\n"}, {OUT=>"2 2M\n1 1E\n"}], # SI and IEC prefixes on separate keys allowed @@ -105,13 +105,13 @@ my @Tests = ["03c", '-k1 -k2', {IN=>"A b\nA a\n"}, {OUT=>"A a\nA b\n"}], # Fail with a diagnostic when -k specifies field == 0. ["03d", '-k0', {EXIT=>2}, - {ERR=>"$prog: -: invalid field specification `0'\n"}, + {ERR=>"$prog: -: invalid field specification '0'\n"}, $normalize_filename], # Fail with a diagnostic when -k specifies character == 0. ["03e", '-k1.0', {EXIT=>2}, - {ERR=>"$prog: character offset is zero: invalid field specification `1.0'\n"}], + {ERR=>"$prog: character offset is zero: invalid field specification '1.0'\n"}], ["03f", '-k1.1,-k0', {EXIT=>2}, - {ERR=>"$prog: invalid number after `,': invalid count at start of `-k0'\n"}], + {ERR=>"$prog: invalid number after ',': invalid count at start of '-k0'\n"}], # This is ok. ["03g", '-k1.1,1.0', {IN=>''}], # This is equivalent to 3f. @@ -158,10 +158,10 @@ my @Tests = # # report an error for '.' without following char spec ["08a", '-k 2.,3', {EXIT=>2}, - {ERR=>"$prog: invalid number after `.': invalid count at start of `,3'\n"}], + {ERR=>"$prog: invalid number after '.': invalid count at start of ',3'\n"}], # report an error for ',' without following POS2 ["08b", '-k 2,', {EXIT=>2}, - {ERR=>"$prog: invalid number after `,': invalid count at start of `'\n"}], + {ERR=>"$prog: invalid number after ',': invalid count at start of ''\n"}], # # Test new -g option. ["09a", '-g', {IN=>"1e2\n2e1\n"}, {OUT=>"2e1\n1e2\n"}], @@ -334,19 +334,19 @@ my @Tests = # Specifying incompatible options should evoke a failure. ["incompat1", '-in', {EXIT=>2}, - {ERR=>"$prog: options `-in' are incompatible\n"}], + {ERR=>"$prog: options '-in' are incompatible\n"}], ["incompat2", '-nR', {EXIT=>2}, - {ERR=>"$prog: options `-nR' are incompatible\n"}], + {ERR=>"$prog: options '-nR' are incompatible\n"}], ["incompat3", '-dfgiMnR', {EXIT=>2}, - {ERR=>"$prog: options `-dfgMnR' are incompatible\n"}], + {ERR=>"$prog: options '-dfgMnR' are incompatible\n"}], ["incompat4", qw(-c -o /dev/null), {EXIT=>2}, - {ERR=>"$prog: options `-co' are incompatible\n"}], + {ERR=>"$prog: options '-co' are incompatible\n"}], ["incompat5", qw(-C -o /dev/null), {EXIT=>2}, - {ERR=>"$prog: options `-Co' are incompatible\n"}], + {ERR=>"$prog: options '-Co' are incompatible\n"}], ["incompat6", '-cC', {EXIT=>2}, - {ERR=>"$prog: options `-cC' are incompatible\n"}], + {ERR=>"$prog: options '-cC' are incompatible\n"}], ["incompat7", qw(--sort=random -n), {EXIT=>2}, - {ERR=>"$prog: options `-nR' are incompatible\n"}], + {ERR=>"$prog: options '-nR' are incompatible\n"}], # -t '\0' is accepted, as of coreutils-5.0.91 ['nul-tab', "-k2,2 -t '\\0'", diff --git a/tests/misc/sort-compress b/tests/misc/sort-compress index 09d6720d8..9a4b9f622 100755 --- a/tests/misc/sort-compress +++ b/tests/misc/sort-compress @@ -35,7 +35,7 @@ EOF chmod +x gzip -# Ensure 'sort` is immune to parent's SIGCHLD handler +# Ensure 'sort' is immune to parent's SIGCHLD handler # Use a subshell and an exec to work around a bug in FreeBSD 5.0 /bin/sh. ( # ash doesn't support "trap '' CHLD"; it knows only signal numbers. diff --git a/tests/misc/sort-files0-from b/tests/misc/sort-files0-from index 1b362ac45..6aa10acc1 100755 --- a/tests/misc/sort-files0-from +++ b/tests/misc/sort-files0-from @@ -30,14 +30,14 @@ my @Tests = ( # invalid extra command line argument ['f-extra-arg', '--files0-from=- no-such', {IN=>"a"}, {EXIT=>2}, - {ERR => "$prog: extra operand `no-such'\n" + {ERR => "$prog: extra operand 'no-such'\n" . "file operands cannot be combined with --files0-from\n" . "Try '$prog --help' for more information.\n"} ], # missing input file ['missing', '--files0-from=missing', {EXIT=>2}, - {ERR => "$prog: cannot open `missing' for reading: " + {ERR => "$prog: cannot open 'missing' for reading: " . "No such file or directory\n"}], # input file name of '-' @@ -51,7 +51,7 @@ my @Tests = # empty input, from non-regular file ['empty-nonreg', '--files0-from=/dev/null', {EXIT=>2}, - {ERR => "$prog: no input from `/dev/null'\n"}], + {ERR => "$prog: no input from '/dev/null'\n"}], # one NUL ['nul-1', '--files0-from=-', '<', {IN=>"\0"}, {EXIT=>2}, diff --git a/tests/misc/sort-merge b/tests/misc/sort-merge index 3303d10af..8cdde1875 100755 --- a/tests/misc/sort-merge +++ b/tests/misc/sort-merge @@ -42,12 +42,12 @@ my @Tests = # check validation of --batch-size option ['nmerge-0', "-m --batch-size=0", @inputs, - {ERR=>"$prog: invalid --batch-size argument `0'\n". - "$prog: minimum --batch-size argument is `2'\n"}, {EXIT=>2}], + {ERR=>"$prog: invalid --batch-size argument '0'\n". + "$prog: minimum --batch-size argument is '2'\n"}, {EXIT=>2}], ['nmerge-1', "-m --batch-size=1", @inputs, - {ERR=>"$prog: invalid --batch-size argument `1'\n". - "$prog: minimum --batch-size argument is `2'\n"}, {EXIT=>2}], + {ERR=>"$prog: invalid --batch-size argument '1'\n". + "$prog: minimum --batch-size argument is '2'\n"}, {EXIT=>2}], ['nmerge-neg', "-m --batch-size=-1", @inputs, {ERR=>"$prog: invalid --batch-size argument '-1'\n"}, {EXIT=>2}], @@ -57,7 +57,7 @@ my @Tests = ['nmerge-big', "-m --batch-size=$bigint", @inputs, {ERR_SUBST=>'s/(current rlimit is) \d+/$1/'}, - {ERR=>"$prog: --batch-size argument `$bigint' too large\n". + {ERR=>"$prog: --batch-size argument '$bigint' too large\n". "$prog: maximum --batch-size argument with current rlimit is\n"}, {EXIT=>2}], @@ -68,7 +68,7 @@ my @Tests = # temp files are needed ['nmerge-no', "-m --batch-size=2 -T$badtmp", @inputs, {ERR_SUBST=>"s|': .*|':|"}, - {ERR=>"$prog: cannot create temporary file in `$badtmp':\n"}, + {ERR=>"$prog: cannot create temporary file in '$badtmp':\n"}, {EXIT=>2}], # This used to fail because setting batch-size without also setting diff --git a/tests/misc/stdbuf b/tests/misc/stdbuf index 99bb24300..bf4edc179 100755 --- a/tests/misc/stdbuf +++ b/tests/misc/stdbuf @@ -96,7 +96,7 @@ retry_delay_ stdbuf_unbuffer .1 6 || fail=1 # One could remove the need for dd (used to close the fifo to get uniq to quit # early), if head -n1 read stdin char by char. Note uniq | head -c2 doesn't # suffice due to the buffering implicit in the pipe. sed currently does read -# stdin char by char, so we can test with 'sed 1q`. However I'm wary about +# stdin char by char, so we can test with 'sed 1q'. However I'm wary about # adding this dependency on a program outside of coreutils. # printf '2\n' > exp # printf '1\n2\n' | (stdbuf -i0 sed 1q >/dev/null; cat) > out diff --git a/tests/misc/tac b/tests/misc/tac index 48c872f62..077cc0c9d 100755 --- a/tests/misc/tac +++ b/tests/misc/tac @@ -67,7 +67,7 @@ my @Tests = ['pipe-bad-tmpdir', {ENV => "TMPDIR=$bad_dir"}, {IN_PIPE => "a\n"}, - {ERR_SUBST => "s,`$bad_dir': .*,...,"}, + {ERR_SUBST => "s,'$bad_dir': .*,...,"}, {ERR => "$prog: failed to create temporary file in ...\n"}, {EXIT => 1}], diff --git a/tests/misc/tail b/tests/misc/tail index 910297664..41c2f9a99 100755 --- a/tests/misc/tail +++ b/tests/misc/tail @@ -56,13 +56,13 @@ my @tv = ( ['obs-b', '-b', "x\n" x (512 * 10 / 2 + 1), "x\n" x (512 * 10 / 2), 0], ['err-1', '+cl', '', '', 1, - "$prog: cannot open `+cl' for reading: No such file or directory\n"], + "$prog: cannot open '+cl' for reading: No such file or directory\n"], ['err-2', '-cl', '', '', 1, "$prog: l: invalid number of bytes\n"], ['err-3', '+2cz', '', '', 1, - "$prog: cannot open `+2cz' for reading: No such file or directory\n"], + "$prog: cannot open '+2cz' for reading: No such file or directory\n"], # This should get 'tail: invalid option -- 2' ['err-4', '-2cX', '', '', 1, diff --git a/tests/misc/test b/tests/misc/test index aad07d057..ac30c3790 100755 --- a/tests/misc/test +++ b/tests/misc/test @@ -175,7 +175,7 @@ my @Tests = ['lt-5', "$limits->{INTMAX_UFLOW} -lt $limits->{UINTMAX_OFLOW}"], ['inv-1', qw(0x0 -eq 00), {EXIT=>2}, - {ERR=>"$prog: invalid integer `0x0'\n"}], + {ERR=>"$prog: invalid integer '0x0'\n"}], ['t1', "-t"], ['t2', qw(-t 1), {EXIT=>1}], diff --git a/tests/misc/test-diag b/tests/misc/test-diag index c6e15cf47..9c0ce227f 100755 --- a/tests/misc/test-diag +++ b/tests/misc/test-diag @@ -27,7 +27,7 @@ my $prog = "$ENV{abs_top_builddir}/src/test"; my @Tests = ( # In coreutils-5.93, this diagnostic lacked the newline. - ['o', '-o arg', {ERR => "test: extra argument `-o'\n"}, + ['o', '-o arg', {ERR => "test: extra argument '-o'\n"}, {ERR_SUBST => 's!^.*:!test:!'}, {EXIT => 2}], ); diff --git a/tests/misc/timeout b/tests/misc/timeout index cc1ad3d6e..d69e2f21b 100755 --- a/tests/misc/timeout +++ b/tests/misc/timeout @@ -42,7 +42,7 @@ test $? = 124 || fail=1 timeout -s0 -k1 1 sleep 10 test $? = 124 && fail=1 -# Ensure 'timeout` is immune to parent's SIGCHLD handler +# Ensure 'timeout' is immune to parent's SIGCHLD handler # Use a subshell and an exec to work around a bug in FreeBSD 5.0 /bin/sh. ( # ash doesn't support "trap '' CHLD"; it knows only signal numbers. diff --git a/tests/misc/tr b/tests/misc/tr index ba6e943c8..89f777757 100755 --- a/tests/misc/tr +++ b/tests/misc/tr @@ -112,7 +112,7 @@ my @Tests = ['rep-3', qw('a[b*513]c' '1[x*]2'), {IN=>'abc'}, {OUT=>'1x2'}], # Another couple octal repeat count tests. ['o-rep-1', qw('[b*08]' '[x*]'), {IN=>''}, {OUT=>''}, {EXIT=>1}, - {ERR=>"$prog: invalid repeat count `08' in [c*n] construct\n"}], + {ERR=>"$prog: invalid repeat count '08' in [c*n] construct\n"}], ['o-rep-2', qw('[b*010]cd' '[a*7]BC[x*]'), {IN=>'bcd'}, {OUT=>'BCx'}], ['esc', qw('a\-z' A-Z), {IN=>'abc-z'}, {OUT=>'AbcBC'}], @@ -141,9 +141,9 @@ my @Tests = # Ensure that these fail. # Prior to 2.0.20, each would evoke a failed assertion. ['empty-eq', qw('[==]' x), {IN=>''}, {OUT=>''}, {EXIT=>1}, - {ERR=>"$prog: missing equivalence class character `[==]'\n"}], + {ERR=>"$prog: missing equivalence class character '[==]'\n"}], ['empty-cc', qw('[::]' x), {IN=>''}, {OUT=>''}, {EXIT=>1}, - {ERR=>"$prog: missing character class name `[::]'\n"}], + {ERR=>"$prog: missing character class name '[::]'\n"}], # Weird repeat counts. ['repeat-bs-9', qw(abc '[b*\9]'), {IN=>'abcd'}, {OUT=>'[b*d'}], diff --git a/tests/misc/tsort b/tests/misc/tsort index 88fcec50a..6f41cc07a 100755 --- a/tests/misc/tsort +++ b/tests/misc/tsort @@ -54,7 +54,7 @@ my @Tests = ['only-one', {IN => {f => ""}}, {IN => {g => ""}}, {EXIT => 1}, - {ERR => "tsort: extra operand `g'\n" + {ERR => "tsort: extra operand 'g'\n" . "Try 'tsort --help' for more information.\n"}], ); diff --git a/tests/misc/tty-eof b/tests/misc/tty-eof index eaaec35c8..d6c4a7714 100755 --- a/tests/misc/tty-eof +++ b/tests/misc/tty-eof @@ -67,7 +67,7 @@ $@ my $exp = new Expect; $exp->log_user(0); $exp->spawn("$cmd 2> $stderr") - or (warn "$ME: cannot run `$cmd': $!\n"), $fail=1, next; + or (warn "$ME: cannot run '$cmd': $!\n"), $fail=1, next; # No input for cut -f2. $cmd =~ /^cut/ or $exp->send("a b\n"); diff --git a/tests/misc/wc-files0-from b/tests/misc/wc-files0-from index ac96c98d4..0f99aeeb6 100755 --- a/tests/misc/wc-files0-from +++ b/tests/misc/wc-files0-from @@ -30,14 +30,14 @@ my @Tests = ( # invalid extra command line argument ['f-extra-arg', '--files0-from=- no-such', {IN=>"a"}, {EXIT=>1}, - {ERR => "$prog: extra operand `no-such'\n" + {ERR => "$prog: extra operand 'no-such'\n" . "file operands cannot be combined with --files0-from\n" . "Try '$prog --help' for more information.\n"} ], # missing input file ['missing', '--files0-from=missing', {EXIT=>1}, - {ERR => "$prog: cannot open `missing' for reading: " + {ERR => "$prog: cannot open 'missing' for reading: " . "No such file or directory\n"}], # input file name of '-' diff --git a/tests/misc/xstrtol b/tests/misc/xstrtol index bdc7bff28..fa0056fcd 100755 --- a/tests/misc/xstrtol +++ b/tests/misc/xstrtol @@ -39,7 +39,7 @@ my @Tests = {ERR=>"$prog: invalid --pages argument 'x'\n"}], ['inv-pg-range', "--pages=9x", {EXIT => 1}, - {ERR=>"$prog: invalid page range `9x'\n"}], + {ERR=>"$prog: invalid page range '9x'\n"}], ); my $save_temps = $ENV{DEBUG}; |