From a0b4ac0fa2d3ae34fcb3930e160b1ad5b49dfd0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?=
Date: Sun, 3 May 2026 11:28:19 +0100 Subject: [PATCH] tests: tee: ensure tee is non buffered * tests/tee/tee.sh: tests/misc/responsive.sh only confirms responsiveness to lines, so add a test for non line terminated. https://github.com/coreutils/coreutils/pull/259 --- tests/tee/tee.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/tee/tee.sh b/tests/tee/tee.sh index eccfdb875..5c4de6a5e 100755 --- a/tests/tee/tee.sh +++ b/tests/tee/tee.sh @@ -26,6 +26,12 @@ printf "1\n2\n" > exp || framework_failure_ (echo 1;sleep .1;echo 2) | tee > out || fail=1 compare exp out || fail=1 +# Ensure tee is not buffered +tee_output() { sleep $1; test -s tee_output; } +{ printf 'a'; retry_delay_ tee_output .1 7 || touch no_output; } | + tee > tee_output +test -e no_output && fail=1; + # POSIX says: "Processing of at least 13 file operands shall be supported." for n in 0 1 2 12 13; do files=$(seq $n)