tests: od: ensure od rejects an output type combined with --strings

Reported at https://github.com/uutils/coreutils/issues/15989

* tests/od/od.pl: Add test cases.

Link: https://github.com/coreutils/coreutils/pull/429
This commit is contained in:
Sylvestre Ledru authored and Pádraig Brady committed 2026-11-07 12:35:10 +00:00
1 parent d6efb32a53
commit 30f5713ede
1 file changed
+7
+7
View File
@@ -135,6 +135,13 @@ push @Tests,
{IN_PIPE=>""}, {EXIT=>1},
{ERR=>"od: -$_ argument '$INTMAX_OFLOW' too large\n"}]} qw(j N S w);
# Ensure an output type cannot be combined with --strings.
push @Tests,
map {(my $name = $_) =~ tr/- //d;
["S-type-$name", "--strings=1 $_", {IN=>"a\n"}, {EXIT=>1},
{ERR=>"$prog: no type may be specified when dumping strings\n"}]}
('-b', '-c', '-d', '-i', '-l', '-o', '-s', '-x', '-t x1');
my $save_temps = $ENV{DEBUG};
my $verbose = $ENV{VERBOSE};