tests: od: ensure od prints the final offset even when an input fails

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

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

Link: https://github.com/coreutils/coreutils/pull/428
This commit is contained in:
Sylvestre Ledru authored and Pádraig Brady committed 2026-11-07 12:35:10 +00:00
1 parent d004eacceb
commit d6efb32a53
1 file changed
+5
+5
View File
@@ -123,6 +123,11 @@ my @Tests =
{IN=>{h=>'bcdefghij'}}, {EXIT=>1},
{OUT=>" a b c d\n e f g h\n i j\n"},
{ERR=>"$prog: missing: $limits->{ENOENT}\n"}],
# Ensure the final offset is still printed after an input fails.
['read-err-offset', '-c', {IN=>{g=>"a\n"}}, '.', {EXIT=>1},
{OUT=>"0000000 a \\n\n0000002\n"},
{ERR=>"$prog: .: $limits->{EISDIR}\n"}],
);
push @Tests,