sync no longer fails for write-only file arguments.
[bug introduced with argument support to sync in coreutils-8.24]
+ In 'base64 a b', and likewise for base32, the tool now correctly
+ diagnoses 'b' as the extra operand, not 'a'.
+ [bug introduced in coreutils-5.3.0]
+
** Changes in behavior
echo now always processes backslash escapes when the POSIXLY_CORRECT
if (argc - optind > 1)
{
- error (0, 0, _("extra operand %s"), quote (argv[optind]));
+ error (0, 0, _("extra operand %s"), quote (argv[optind+1]));
usage (EXIT_FAILURE);
}
sub gen_tests($)
{
my ($prog) = @_;
+ my $try_help = "Try '$prog --help' for more information.\n";
@Tests=
(
['empty', {IN=>''}, {OUT=>""}],
['b4k-1', '--decode', {IN=>$a3k_nl[1]}, {OUT=>'a' x (3072+0)}],
['b4k-2', '--decode', {IN=>$a3k_nl[2]}, {OUT=>'a' x (3072+0)}],
['b4k-3', '--decode', {IN=>$a3k_nl[3]}, {OUT=>'a' x (3072+0)}],
+
+ ['ext-op1', 'a b', {IN=>''}, {EXIT=>1},
+ {ERR => "$prog: extra operand 'b'\n" . $try_help}],
+ # Again, with more option arguments
+ ['ext-op2', '-di --wrap=40 a b', {IN=>''}, {EXIT=>1},
+ {ERR => "$prog: extra operand 'b'\n" . $try_help}],
);
if ($prog eq "base64")
['noenc', '', {IN=>''}, {EXIT=>1},
{ERR=>"$prog: missing encoding type\n" . $try_help }],
- ## TODO: Fix to "B" (this is a bug in the original base64.c:1064
['extra', '--base64 A B', {IN=>''}, {EXIT=>1},
- {ERR=>"$prog: extra operand 'A'\n" . $try_help}],
+ {ERR=>"$prog: extra operand 'B'\n" . $try_help}],
['empty1', '--base64', {IN=>''}, {OUT=>""}],