From d6efb32a53046e0d134e8dcc767e91df5660dfbe Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 29 Oct 2026 21:30:39 +0100 Subject: [PATCH] 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 --- tests/od/od.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/od/od.pl b/tests/od/od.pl index a91925b7d..4ff8553a6 100755 --- a/tests/od/od.pl +++ b/tests/od/od.pl @@ -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,