mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-02-17 04:41:59 +02:00
maint: update quoting of "Try `prog --help'" to "Try 'prog --help'"
Automatically adjust both the source (now in only one place) and all tests that expect the resulting output via this: git grep -l 'Try.*--help' src/system.h tests \ | xargs perl -pi -e 's/Try \\?`(\S+ --help)/Try '\''$1/'
This commit is contained in:
@@ -559,7 +559,7 @@ emit_ancillary_info (void)
|
||||
static inline void
|
||||
emit_try_help (void)
|
||||
{
|
||||
fprintf (stderr, _("Try `%s --help' for more information.\n"), program_name);
|
||||
fprintf (stderr, _("Try '%s --help' for more information.\n"), program_name);
|
||||
}
|
||||
|
||||
#include "inttostr.h"
|
||||
|
||||
@@ -32,7 +32,7 @@ my @Tests =
|
||||
['f-extra-arg', '--files0-from=- no-such', {IN=>"a"}, {EXIT=>1},
|
||||
{ERR => "$prog: extra operand `no-such'\n"
|
||||
. "file operands cannot be combined with --files0-from\n"
|
||||
. "Try `$prog --help' for more information.\n"}
|
||||
. "Try '$prog --help' for more information.\n"}
|
||||
],
|
||||
|
||||
# missing input file
|
||||
|
||||
@@ -30,7 +30,7 @@ Valid arguments are:
|
||||
- [posix-]iso
|
||||
- [posix-]locale
|
||||
- +FORMAT (e.g., +%H:%M) for a `date'-style format
|
||||
Try `ls --help' for more information.
|
||||
Try 'ls --help' for more information.
|
||||
EOF
|
||||
|
||||
compare exp err || fail=1
|
||||
|
||||
@@ -33,9 +33,9 @@ my $prog = 'basename';
|
||||
my @Tests =
|
||||
(
|
||||
['fail-1', {ERR => "$prog: missing operand\n"
|
||||
. "Try `$prog --help' for more information.\n"}, {EXIT => '1'}],
|
||||
. "Try '$prog --help' for more information.\n"}, {EXIT => '1'}],
|
||||
['fail-2', qw(a b c), {ERR => "$prog: extra operand `c'\n"
|
||||
. "Try `$prog --help' for more information.\n"}, {EXIT => '1'}],
|
||||
. "Try '$prog --help' for more information.\n"}, {EXIT => '1'}],
|
||||
|
||||
['a', qw(d/f), {OUT => 'f'}],
|
||||
['b', qw(/d/f), {OUT => 'f'}],
|
||||
|
||||
@@ -58,17 +58,17 @@ my @Tests =
|
||||
# invalid missing command line argument (1)
|
||||
['missing-arg1', $inputs[0], {EXIT=>1},
|
||||
{ERR => "$prog: missing operand after `a'\n"
|
||||
. "Try `$prog --help' for more information.\n"}],
|
||||
. "Try '$prog --help' for more information.\n"}],
|
||||
|
||||
# invalid missing command line argument (both)
|
||||
['missing-arg2', {EXIT=>1},
|
||||
{ERR => "$prog: missing operand\n"
|
||||
. "Try `$prog --help' for more information.\n"}],
|
||||
. "Try '$prog --help' for more information.\n"}],
|
||||
|
||||
# invalid extra command line argument
|
||||
['extra-arg', @inputs, 'no-such', {EXIT=>1},
|
||||
{ERR => "$prog: extra operand `no-such'\n"
|
||||
. "Try `$prog --help' for more information.\n"}],
|
||||
. "Try '$prog --help' for more information.\n"}],
|
||||
|
||||
# out-of-order input
|
||||
['ooo', {IN=>{a=>"1\n3"}}, {IN=>{b=>"3\n2"}}, {EXIT=>1},
|
||||
|
||||
@@ -28,7 +28,7 @@ my $mb_locale = $ENV{LOCALE_FR_UTF8};
|
||||
and $mb_locale = 'C';
|
||||
|
||||
my $prog = 'cut';
|
||||
my $try = "Try \`$prog --help' for more information.\n";
|
||||
my $try = "Try '$prog --help' for more information.\n";
|
||||
my $from_1 = "$prog: fields and positions are numbered from 1\n$try";
|
||||
my $inval = "$prog: invalid byte or field list\n$try";
|
||||
my $no_endpoint = "$prog: invalid range with no endpoint: -\n$try";
|
||||
|
||||
@@ -34,9 +34,9 @@ my $prog = 'dirname';
|
||||
my @Tests =
|
||||
(
|
||||
['fail-1', {ERR => "$prog: missing operand\n"
|
||||
. "Try `$prog --help' for more information.\n"}, {EXIT => '1'}],
|
||||
. "Try '$prog --help' for more information.\n"}, {EXIT => '1'}],
|
||||
['fail-2', qw(a b), {ERR => "$prog: extra operand `b'\n"
|
||||
. "Try `$prog --help' for more information.\n"}, {EXIT => '1'}],
|
||||
. "Try '$prog --help' for more information.\n"}, {EXIT => '1'}],
|
||||
|
||||
['a', qw(d/f), {OUT => 'd'}],
|
||||
['b', qw(/d/f), {OUT => '/d'}],
|
||||
|
||||
@@ -159,7 +159,7 @@ my @Tests =
|
||||
['fail-b', '9 9', {ERR => "$prog: syntax error\n"},
|
||||
{EXIT => 2}],
|
||||
['fail-c', {ERR => "$prog: missing operand\n"
|
||||
. "Try `$prog --help' for more information.\n"},
|
||||
. "Try '$prog --help' for more information.\n"},
|
||||
{EXIT => 2}],
|
||||
|
||||
['bignum-add', "$big + 1", {OUT => $big_p1}],
|
||||
|
||||
@@ -59,7 +59,7 @@ my @Tests =
|
||||
['z', '-1',
|
||||
{ERR_SUBST => q!s/'1'/1/!}, # map newer glibc diagnostic to expected.
|
||||
{ERR => "$prog: invalid option -- 1\n"
|
||||
. "Try `$prog --help' for more information.\n"},
|
||||
. "Try '$prog --help' for more information.\n"},
|
||||
{EXIT => 1}],
|
||||
['cont', 'a 4',
|
||||
{OUT => "4: 2 2\n"},
|
||||
|
||||
@@ -37,7 +37,7 @@ my @Tests =
|
||||
['obs-1', '-c -72',
|
||||
{ERR => "fmt: invalid option -- 7; -WIDTH is recognized only when it"
|
||||
. " is the first\noption; use -w N instead\n"
|
||||
. "Try `fmt --help' for more information.\n" }, {EXIT => 1}],
|
||||
. "Try 'fmt --help' for more information.\n" }, {EXIT => 1}],
|
||||
|
||||
# With --prefix=P, do not remove leading space on lines without the prefix.
|
||||
['pfx-1', qw (-p '>'),
|
||||
|
||||
@@ -65,7 +65,7 @@ foreach my $prog (@built_programs)
|
||||
$prog eq '['
|
||||
and next;
|
||||
|
||||
my $try = "Try \`$prog --help' for more information.\n";
|
||||
my $try = "Try '$prog --help' for more information.\n";
|
||||
my $x = $exit_status{$prog};
|
||||
defined $x
|
||||
or $x = 1;
|
||||
|
||||
@@ -57,7 +57,7 @@ my @Tests =
|
||||
#
|
||||
['too-many', 'a b',
|
||||
{ERR=>"$prog: too many templates\n"
|
||||
. "Try `$prog --help' for more information.\n"}, {EXIT => 1} ],
|
||||
. "Try '$prog --help' for more information.\n"}, {EXIT => 1} ],
|
||||
['too-many-q', '-q a b', {EXIT => 1} ],
|
||||
|
||||
['too-few-x', 'foo.XX', {EXIT => 1},
|
||||
@@ -164,7 +164,7 @@ my @Tests =
|
||||
['suffix9f', 'aXXXX --suffix=b', {EXIT=>1},
|
||||
{ENV=>"POSIXLY_CORRECT=1"},
|
||||
{ERR=>"$prog: too many templates\n"
|
||||
. "Try `$prog --help' for more information.\n"}],
|
||||
. "Try '$prog --help' for more information.\n"}],
|
||||
|
||||
['suffix10f', 'aXXb', {EXIT => 1},
|
||||
{ERR=>"$prog: too few X's in template `aXXb'\n"}],
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
use strict;
|
||||
|
||||
my $prog = 'printf';
|
||||
my $try = "Try \`$prog --help' for more information.\n";
|
||||
my $try = "Try '$prog --help' for more information.\n";
|
||||
my $pow_2_31 = 2**31;
|
||||
|
||||
# Turn off localization of executable's output.
|
||||
|
||||
@@ -24,7 +24,7 @@ use strict;
|
||||
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
|
||||
|
||||
my $prog = 'seq';
|
||||
my $try_help = "Try `$prog --help' for more information.\n";
|
||||
my $try_help = "Try '$prog --help' for more information.\n";
|
||||
|
||||
my $locale = $ENV{LOCALE_FR_UTF8};
|
||||
! defined $locale || $locale eq 'none'
|
||||
|
||||
@@ -32,7 +32,7 @@ my @Tests =
|
||||
['f-extra-arg', '--files0-from=- no-such', {IN=>"a"}, {EXIT=>2},
|
||||
{ERR => "$prog: extra operand `no-such'\n"
|
||||
. "file operands cannot be combined with --files0-from\n"
|
||||
. "Try `$prog --help' for more information.\n"}
|
||||
. "Try '$prog --help' for more information.\n"}
|
||||
],
|
||||
|
||||
# missing input file
|
||||
|
||||
@@ -55,7 +55,7 @@ my @Tests =
|
||||
['only-one', {IN => {f => ""}}, {IN => {g => ""}},
|
||||
{EXIT => 1},
|
||||
{ERR => "tsort: extra operand `g'\n"
|
||||
. "Try `tsort --help' for more information.\n"}],
|
||||
. "Try 'tsort --help' for more information.\n"}],
|
||||
);
|
||||
|
||||
my $save_temps = $ENV{DEBUG};
|
||||
|
||||
@@ -21,7 +21,7 @@ use strict;
|
||||
my $limits = getlimits ();
|
||||
|
||||
my $prog = 'uniq';
|
||||
my $try = "Try \`$prog --help' for more information.\n";
|
||||
my $try = "Try '$prog --help' for more information.\n";
|
||||
|
||||
# Turn off localization of executable's output.
|
||||
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
|
||||
|
||||
@@ -32,7 +32,7 @@ my @Tests =
|
||||
['f-extra-arg', '--files0-from=- no-such', {IN=>"a"}, {EXIT=>1},
|
||||
{ERR => "$prog: extra operand `no-such'\n"
|
||||
. "file operands cannot be combined with --files0-from\n"
|
||||
. "Try `$prog --help' for more information.\n"}
|
||||
. "Try '$prog --help' for more information.\n"}
|
||||
],
|
||||
|
||||
# missing input file
|
||||
|
||||
@@ -36,9 +36,9 @@ mv --target=f2 f1 >> out 2>&1 && fail=1
|
||||
|
||||
cat > exp <<\EOF
|
||||
mv: missing file operand
|
||||
Try `mv --help' for more information.
|
||||
Try 'mv --help' for more information.
|
||||
mv: missing destination file operand after `no-file'
|
||||
Try `mv --help' for more information.
|
||||
Try 'mv --help' for more information.
|
||||
mv: target `f1' is not a directory
|
||||
mv: target `f2' is not a directory
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user