tests: accommodate newer GNU make's SIGPIPE-ignore

* tests/colors: Allow an exit code of not just 141 (SIGPIPE),
but also "error": 2.
Reported by Tomasz Kłoczko in http://bugs.gnu.org/59905.
This commit is contained in:
Jim Meyering 2023-01-16 15:48:10 -08:00 committed by Jim Meyering
parent aa13187f2a
commit 89f3daeaaf

View File

@ -128,6 +128,9 @@ printf '%1000000s-a' > a
printf '%1000000s-b' > b
head -c 10 < fifo > /dev/null &
diff --color=always ---presume-output-tty a b > fifo
test $? = 141 || fail=1
# Depending on version of GNU make (4.3.92-4.4 set SIGPIPE to "ignore"),
# either of these is acceptable.
case $? in 2|141) ;; *) fail=1 ;; esac
Exit $fail