about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests16
1 files changed, 13 insertions, 3 deletions
diff --git a/tests b/tests
index 5a5168a..e810c0d 100755
--- a/tests
+++ b/tests
@@ -1,5 +1,5 @@
 #!/bin/sh
-printf '1..40\n'
+printf '1..42\n'
 
 set -e
 
@@ -127,15 +127,19 @@ check_output 'using -A%' '$XE -A% echo -- % 1 2 3' <<EOF
 -- 3
 EOF
 
-check_output 'using -a with no arguments' '$XE -A% echo' <<EOF
+check_output 'using -A% with no arguments' '$XE -A% echo' <<EOF
 EOF
 
-check_output 'using -a with no command' '$XE -N2 -A% % 1 2 3' <<EOF
+check_output 'using -A% with no command' '$XE -N2 -A% % 1 2 3' <<EOF
 1
 2
 3
 EOF
 
+check_output 'using -f' 'necho notme | $XE -f tests echo | grep ^notme || echo success' <<EOF
+success
+EOF
+
 check_output 'using -s' 'necho 1 2 3 | $XE -s "echo x\$1"' <<EOF
 x1
 x2
@@ -224,6 +228,12 @@ y
 y
 EOF
 
+check_output 'should not close stdin when arguments were read from file' 'yes | $XE -f tests -s "sed q" | sed 3q' <<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