From fc65b03e3fc8e495af7c78ea4afd9b2473375713 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 8 Nov 2026 21:59:26 +0100 Subject: [PATCH] tests: od: check T, P and E suffixes after 0 or 0x in -N * tests/od/od-N.sh: Ensure -N accepts octal and hex values with T, P, E, TB, PB and EB suffixes. https://github.com/uutils/coreutils/pull/15930 Link: https://github.com/coreutils/coreutils/pull/451 --- tests/od/od-N.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/od/od-N.sh b/tests/od/od-N.sh index 97c1a8f46..db36ba3de 100755 --- a/tests/od/od-N.sh +++ b/tests/od/od-N.sh @@ -54,6 +54,13 @@ printf '\001%10s\000%10s\000' | od -S10 > out || fail=1 printf '%07o %10s\n' 1 '' 12 '' > exp || framework_failure_ compare exp out || fail=1 +# Ensure T, P and E suffixes work after a 0 or 0x prefix +od -An -c in > exp || framework_failure_ +for n in 01T 01P 01E 01TB 01PB 01EB 0x1T 0x1P; do + od -An -c -N$n in > out || fail=1 + compare exp out || fail=1 +done + # Ensure no address output for read error # (Users may use -N0 -j... to do base conversion) if ! cat . >/dev/null 2>&1; then