mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
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
This commit is contained in:
1 parent
b130ed810e
commit
a0b4ac0fa2
1 file changed
+6
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user