summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-02-10 21:09:48 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2016-02-10 21:09:48 +0100
commitdfb94adb2574b60e7eb403f00789ab6576960435 (patch)
tree9a4436efa892cbe1eace6a909fdfc0ae37d40c51 /tests
parent86fa5ec3d5bd08d5ea5282aafb8a1d02917a088b (diff)
downloadxe-dfb94adb2574b60e7eb403f00789ab6576960435.tar.gz
xe-dfb94adb2574b60e7eb403f00789ab6576960435.tar.xz
xe-dfb94adb2574b60e7eb403f00789ab6576960435.zip
only close stdin when we read arguments from it
Diffstat (limited to 'tests')
-rwxr-xr-xtests11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests b/tests
index b02b638..5a5168a 100755
--- a/tests
+++ b/tests
@@ -1,5 +1,5 @@
 #!/bin/sh
-printf '1..38\n'
+printf '1..40\n'
 
 set -e
 
@@ -215,6 +215,15 @@ a
 123
 EOF
 
+check_output 'should close stdin when arguments were read from it' 'necho a b c | $XE -s "sed q"' <<EOF
+EOF
+
+check_output 'should not close stdin when arguments were read from command line' 'yes | $XE -a -s "sed q" -- 1 2 3' <<EOF
+y
+y
+y
+EOF
+
 printf '# limit checks, expecting maximal POSIX limits available\n'
 
 check_output 'argscap check' 'head -c 17711 /dev/zero | tr "\0" "\012" | $XE -N0 -s "echo \$#"' <<EOF