Results for builtin-set.test.sh

statusbashdashmkshzshosh
pass 2420171523
ok 01011
N-I 01120
BUG 02660
total2424242424
casebashdashmkshzshoshdescription
0pass BUG BUG BUG pass can continue after unknown option
detailsdetailsdetails
1pass pass pass pass pass set with both options and argv
2pass pass pass pass pass nounset with "$@"
3pass pass pass pass pass set -u -- clears argv
4pass pass pass pass pass set -u -- x y z
5pass pass pass pass pass set -u with undefined variable exits the interpreter
6pass BUG BUG BUG pass set -u with undefined var in interactive shell does NOT exit the interpreter
detailsdetailsdetails
7pass pass BUG BUG pass set -u error can break out of nested evals
detailsdetails
8pass pass pass pass pass reset option with long flag
9pass pass pass pass pass reset option with short flag
10pass ok pass pass pass set -eu (flag parsing)
details
11pass pass pass pass pass set -o lists options
12pass pass pass BUG pass 'set' and 'eval' round trip
details
13pass pass pass BUG pass set - - and so forth
details
14pass pass pass BUG pass set - leading single dash is ignored, turns off xtrace verbose (#2364)
details
15pass pass pass N-I pass set - stops option processing like set --
details
16pass pass BUG N-I pass A single + is an ignored flag; not an argument
detailsdetails
17pass pass BUG ok ok set - + and + -
detailsdetailsdetails
18pass pass pass pass pass set -a exports variables
19pass pass pass pass pass set +a stops exporting
20pass pass pass pass pass set -o allexport (long form)
21pass pass pass pass pass variables set before set -a are not exported
22pass pass BUG pass pass set -a exports local variables
details
23pass N-I N-I pass pass set -a exports declare variables
detailsdetails
99 passed, 3 OK, 4 not implemented, 14 BUG, 0 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

dash0 can continue after unknown option

stdout:
stderr: 
dash: 2: set: Illegal option -o STRICT
mksh0 can continue after unknown option

stdout:
stderr: 
mksh: <stdin>[2]: set: STRICT: bad option
zsh0 can continue after unknown option

stdout:
stderr: 
set: no such option: STRICT
dash6 set -u with undefined var in interactive shell does NOT exit the interpreter

stdout:
before
OK
before
OK
stderr:
dash: 1: x: parameter not set
dash: 0: can't access tty; job control turned off
dash: 1: x: parameter not set
$ 
mksh6 set -u with undefined var in interactive shell does NOT exit the interpreter

stdout:
before
OK
before
OK
stderr:
mksh: x: parameter not set
mksh: can't find tty fd: No such device or address
mksh: warning: won't have full job control
mksh: x: parameter not set
zsh6 set -u with undefined var in interactive shell does NOT exit the interpreter

stdout:
before
OK
before
OK
stderr:
zsh:1: x: parameter not set
zsh:1: x: parameter not set
mksh7 set -u error can break out of nested evals

stdout:
before
after
stderr:
mksh: blarg: parameter not set
zsh7 set -u error can break out of nested evals

stdout:
before
after
stderr:
test_function_2:1: blarg: parameter not set
dash10 set -eu (flag parsing)

stdout:
stderr: 
dash: 2: unset: parameter not set
zsh12 'set' and 'eval' round trip

stdout:
[ ]
stderr:
grep: (standard input): binary file matches
Code saved to /home/uke/oil/_tmp/spec-tmp/builtin-set.test.sh/12-zsh/vars-zsh.txt
zsh13 set - - and so forth

stdout:
a b
a b
a b

--
stderr:
zsh14 set - leading single dash is ignored, turns off xtrace verbose (#2364)

stdout:
verbose-on
xtrace-on

a b c
verbose-on
xtrace-on

x - y z
stderr:
show_options
+zsh:11> show_options
+show_options:1> case 569Xsvx (*v*)
+show_options:2> echo verbose-on
+show_options:4> case 569Xsvx (*x*)
+show_options:5> echo xtrace-on
echo
+zsh:12> echo

set - a b c
+zsh:14> set - a b c
echo "$@"
+zsh:15> echo a b c
show_options
+zsh:16> show_options
+show_options:1> case 569Xsvx (*v*)
+show_options:2> echo verbose-on
+show_options:4> case 569Xsvx (*x*)
+show_options:5> echo xtrace-on
echo
+zsh:17> echo

set x - y z
+zsh:19> set x - y z
echo "$@"
+zsh:20> echo x - y z

zsh15 set - stops option processing like set --

stdout:
stderr: 
mksh16 A single + is an ignored flag; not an argument

stdout:
plus
xtrace-on
plus -v x y
stderr:
+ show_options
+ echo xtrace-on
+ echo plus -v x y
zsh16 A single + is an ignored flag; not an argument

stdout:
stderr: 
mksh17 set - + and + -

stdout:
+
-
stderr:
zsh17 set - + and + -

stdout:
+

stderr:
osh17 set - + and + -

stdout:
+

stderr:
mksh22 set -a exports local variables

stdout:
None
stderr:
dash23 set -a exports declare variables

stdout:
None
stderr:
dash: 2: declare: not found
mksh23 set -a exports declare variables

stdout:
None
stderr:
mksh: <stdin>[2]: declare: not found