1 ## compare_shells: bash dash mksh zsh ash
2 ## oils_failures_allowed: 0
3
4 # TODO:
5 # - go through all of compgen -A builtin - which ones allow extra args?
6 # - cd builtin should be strict
7
8 #### true extra
9 true extra
10 ## STDOUT:
11 ## END
12
13 #### shift 1 extra
14 $SH -c '
15 set -- a b c
16 shift 1 extra
17 '
18 if test $? -eq 0; then
19 echo fail
20 fi
21
22 ## STDOUT:
23 ## END
24 ## BUG dash/mksh/zsh/ash STDOUT:
25 fail
26 ## END
27
28 #### continue 1 extra, break, etc.
29 $SH -c '
30 for i in foo; do
31 continue 1 extra
32 done
33 echo status=$?
34 '
35 if test $? -eq 0; then
36 echo fail
37 fi
38
39 ## STDOUT:
40 ## END
41
42 ## BUG dash/ash/mksh STDOUT:
43 status=0
44 fail
45 ## END
46
47 ## BUG-2 zsh STDOUT:
48 status=1
49 fail
50 ## END