diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2016-02-11 13:23:18 +0100 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2016-02-11 13:28:32 +0100 |
commit | b3bc8cac0063a51ed44a118162d2df327d998576 (patch) | |
tree | 9994d90414413b3d5f8d7cfeb3af1d8cc063d408 /tests | |
parent | dfb94adb2574b60e7eb403f00789ab6576960435 (diff) | |
download | xe-b3bc8cac0063a51ed44a118162d2df327d998576.tar.gz xe-b3bc8cac0063a51ed44a118162d2df327d998576.tar.xz xe-b3bc8cac0063a51ed44a118162d2df327d998576.zip |
support reading arguments from file with -f
Diffstat (limited to 'tests')
-rwxr-xr-x | tests | 16 |
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 |