mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
tests: head: ensure a count is validated even when later overridden
Reported at https://github.com/uutils/coreutils/issues/15997 * tests/head/head.pl: Add test cases. Link: https://github.com/coreutils/coreutils/pull/417
This commit is contained in:
1 parent
9233e94688
commit
d77e262e13
1 file changed
+6
@@ -76,6 +76,12 @@ my @Tests =
|
||||
# --zero-terminated
|
||||
['zero-1', '-z -n 1', {IN=>"x\0y"}, {OUT=>"x\0"}],
|
||||
['zero-2', '-z -n 2', {IN=>"x\0y"}, {OUT=>"x\0y"}],
|
||||
|
||||
# Ensure a count is validated even when a later option overrides it.
|
||||
['overridden-c', '-c 1-3 -n 1', {IN=>"a\n"}, {OUT=>''}, {EXIT=>1},
|
||||
{ERR=>"$prog: invalid number of bytes: '1-3'\n"}],
|
||||
['overridden-n', '-n 1-3 -c 1', {IN=>"a\n"}, {OUT=>''}, {EXIT=>1},
|
||||
{ERR=>"$prog: invalid number of lines: '1-3'\n"}],
|
||||
);
|
||||
|
||||
@Tests = triple_test \@Tests;
|
||||
|
||||
Reference in new issue
Block a user