my @Tests =
(
- ['fail-1', {ERR => "$prog: too few arguments\n"
+ ['fail-1', {ERR => "$prog: missing operand\n"
. "Try `$prog --help' for more information.\n"}, {EXIT => '1'}],
- ['fail-2', qw(a a a), {ERR => "$prog: too many arguments\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'}],
(
# invalid extra command line argument
['f-extra-arg', '--files0-from=- no-such', {IN=>"a"}, {EXIT=>1},
- {ERR => "du: no-such: you may not specify command-line arguments "
- . "with --files0-from\n"}
+ {ERR => "du: extra operand `no-such'\n"
+ . "File operands cannot be combined with --files0-from.\n"
+ . "Try `du --help' for more information.\n"}
],
# missing input file
['fail-b', '9 9', {ERR => "$prog: syntax error\n"},
{EXIT => 2}],
- ['fail-c', {ERR => "$prog: too few arguments\n"
+ ['fail-c', {ERR => "$prog: missing operand\n"
. "Try `$prog --help' for more information.\n"},
{EXIT => 2}],
);
mv --target=f2 f1 >> out 2>&1 && fail=1
cat > exp <<\EOF
-mv: missing file argument
+mv: missing file operand
Try `mv --help' for more information.
-mv: missing file argument
+mv: missing file operand after `no-file'
Try `mv --help' for more information.
mv: when moving multiple files, last argument must be a directory
Try `mv --help' for more information.
['only-one', {IN => {f => ""}}, {IN => {g => ""}},
{EXIT => 1},
- {ERR => "tsort: only one argument may be specified\n"
+ {ERR => "tsort: extra operand `g'\n"
. "Try `tsort --help' for more information.\n"}],
);