summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-05-19 17:13:14 +0200
committerLeah Neukirchen <leah@vuxu.org>2017-05-19 17:13:14 +0200
commit00164de3bc60ad362d97631d4b5dbc66b2d3c96b (patch)
treeb4e1e18adc56063b2569bb877f15d8918c964188 /tests
parenta240ad0707f96e8b205678aaedd813f95122199c (diff)
downloadxe-00164de3bc60ad362d97631d4b5dbc66b2d3c96b.tar.gz
xe-00164de3bc60ad362d97631d4b5dbc66b2d3c96b.tar.xz
xe-00164de3bc60ad362d97631d4b5dbc66b2d3c96b.zip
xe: revise logic to only read new arguments when we immediately need them
This changes behavior on pipes that are written slowly, else there is a
one-line delay between executions.
Diffstat (limited to 'tests')
-rwxr-xr-xtests8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests b/tests
index 2e92b79..07b68e1 100755
--- a/tests
+++ b/tests
@@ -1,5 +1,5 @@
 #!/bin/sh
-printf '1..43\n'
+printf '1..44\n'
 
 set -e
 
@@ -175,6 +175,12 @@ check_output 'with ITER' '$XE -a -s "echo \$ITER" -- a b c' <<EOF
 3
 EOF
 
+check_output 'is eager' '{ echo 1; sleep 1; echo 11 >/dev/stderr; echo 2; } | xe echo' <<EOF
+1
+11
+2
+EOF
+
 printf '# error handling\n'
 
 check_output 'exit code on success' 'true | $XE; echo $?' <<EOF