Results for sh-options.test.sh

casedashbashmkshoshosh_ALTosh-byterundescription
0pass ok ok pass pass FAIL $- with -c
detailsdetailsdetails
1N-I ok ok pass pass FAIL $- with pipefail
detailsdetailsdetailsdetails
2pass pass pass pass pass FAIL $- with interactive shell
details
3pass pass pass pass pass FAIL sh -c
details
4pass pass pass pass pass FAIL empty -c input
details
5pass pass pass pass pass FAIL empty stdin
details
6pass pass pass pass pass FAIL args are passed
details
7pass pass pass pass pass FAIL args that look like flags are passed after script
details
8pass pass pass pass pass FAIL args that look like flags are passed after -c
details
9pass pass pass pass pass pass pass short options on command line
10pass pass pass pass pass pass pass long options on command line
11BUG pass BUG pass pass FAIL can continue after unknown option
detailsdetailsdetails
12pass pass pass pass pass FAIL set with both options and argv
details
13pass pass pass pass pass FAIL set -o vi/emacs
details
14ok pass pass pass pass FAIL nounset
detailsdetails
15ok pass pass pass pass FAIL -u is nounset
detailsdetails
16pass pass pass pass pass FAIL nounset with "$@"
details
17pass pass pass pass pass FAIL set -u -- clears argv
details
18pass pass pass pass pass FAIL set -u -- x y z
details
19pass pass pass pass pass FAIL reset option with long flag
details
20pass pass pass pass pass FAIL reset option with short flag
details
21ok pass pass pass pass pass set -eu (flag parsing)
details
22pass pass pass FAIL FAIL FAIL -n for no execution (useful with --ast-output)
detailsdetailsdetails
23N-I pass pass pass pass FAIL pipefail
detailsdetails
24N-I pass N-I pass pass FAIL shopt -p -o
detailsdetailsdetails
25N-I pass N-I pass pass FAIL shopt -p
detailsdetailsdetails
26pass pass pass pass pass FAIL noclobber off
details
27ok pass pass FAIL FAIL FAIL noclobber on
detailsdetailsdetailsdetails
28N-I pass N-I pass pass FAIL SHELLOPTS is updated when options are changed
detailsdetailsdetails
29N-I pass N-I FAIL FAIL FAIL SHELLOPTS is readonly
detailsdetailsdetailsdetailsdetails
30pass pass pass FAIL FAIL FAIL set -o lists options
detailsdetailsdetails
31pass pass pass FAIL FAIL FAIL set without args lists variables
detailsdetailsdetails
32N-I pass N-I pass pass FAIL shopt -q
detailsdetailsdetails
33N-I ok N-I pass pass FAIL shopt -q invalid
detailsdetailsdetailsdetails
34N-I pass N-I pass pass FAIL sh -i loads rcfile (when combined with -c)
detailsdetailsdetails

141 passed, 9 ok, 16 known unimplemented, 2 known bugs, 5 failed, 0 skipped

Details on runs that didn't PASS

bash0 $- with -c

stdout:
huBc
stderr:
mksh0 $- with -c

stdout:
uhc
stderr:
osh-byterun0 $- with -c

[osh-byterun stdout] Expected 'u\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash1 $- with pipefail

stdout:
stderr: 
_tmp/spec-bin/dash: 1: set: Illegal option -o pipefail
bash1 $- with pipefail

stdout:
huBs
stderr:
mksh1 $- with pipefail

stdout:
ush
stderr:
osh-byterun1 $- with pipefail

[osh-byterun stdout] Expected 'u\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun2 $- with interactive shell

[osh-byterun stdout] Expected 'FALSE\nTRUE\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun3 sh -c

[osh-byterun stdout] Expected 'hi\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun4 empty -c input

[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun5 empty stdin

[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun6 args are passed

[osh-byterun stdout] Expected "['a', 'b']\n", got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun7 args that look like flags are passed after script

[osh-byterun stdout] Expected "['--help', '--help', '-h']\n", got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun8 args that look like flags are passed after -c

[osh-byterun stdout] Expected "['--help', '-h']\n", got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash11 can continue after unknown option

stdout:
stderr: 
_tmp/spec-bin/dash: 2: set: Illegal option -o STRICT
mksh11 can continue after unknown option

stdout:
stderr: 
_tmp/spec-bin/mksh: <stdin>[2]: set: STRICT: bad option
osh-byterun11 can continue after unknown option

[osh-byterun stdout] Expected 'hello\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun12 set with both options and argv

[osh-byterun stdout] Expected 'a b c\n', got ''

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun13 set -o vi/emacs

[osh-byterun stdout] Expected '0\n0\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash14 nounset

stdout:
[]
stderr:
_tmp/spec-bin/dash: 3: unset: parameter not set
osh-byterun14 nounset

[osh-byterun stdout] Expected '[]\n', got ''

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash15 -u is nounset

stdout:
[]
stderr:
_tmp/spec-bin/dash: 3: unset: parameter not set
osh-byterun15 -u is nounset

[osh-byterun stdout] Expected '[]\n', got ''

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun16 nounset with "$@"

[osh-byterun stdout] Expected 'a b c\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun17 set -u -- clears argv

[osh-byterun stdout] Expected '\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun18 set -u -- x y z

[osh-byterun stdout] Expected 'x y z\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun19 reset option with long flag

[osh-byterun stdout] Expected '[]\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun20 reset option with short flag

[osh-byterun stdout] Expected '[]\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash21 set -eu (flag parsing)

stdout:
stderr: 
_tmp/spec-bin/dash: 2: unset: parameter not set
osh22 -n for no execution (useful with --ast-output)

[osh stdout] Expected u'1\n', got '1\n2\n3\n'

stdout:
1
2
3
stderr:
osh_ALT22 -n for no execution (useful with --ast-output)

[osh_ALT stdout] Expected u'1\n', got '1\n2\n3\n'

stdout:
1
2
3
stderr:
osh-byterun22 -n for no execution (useful with --ast-output)

[osh-byterun stdout] Expected u'1\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash23 pipefail

stdout:
0
stderr:
_tmp/spec-bin/dash: 3: set: Illegal option -o pipefail
osh-byterun23 pipefail

[osh-byterun stdout] Expected u'0\n2\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash24 shopt -p -o

stdout:
stderr: 
_tmp/spec-bin/dash: 1: shopt: not found
_tmp/spec-bin/dash: 3: shopt: not found
mksh24 shopt -p -o

stdout:
stderr: 
_tmp/spec-bin/mksh: <stdin>[1]: shopt: not found
_tmp/spec-bin/mksh: <stdin>[3]: shopt: not found
osh-byterun24 shopt -p -o

[osh-byterun stdout] Expected u'set +o nounset\nset -o nounset\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash25 shopt -p

stdout:
stderr: 
_tmp/spec-bin/dash: 1: shopt: not found
_tmp/spec-bin/dash: 2: shopt: not found
_tmp/spec-bin/dash: 3: shopt: not found
mksh25 shopt -p

stdout:
stderr: 
_tmp/spec-bin/mksh: <stdin>[1]: shopt: not found
_tmp/spec-bin/mksh: <stdin>[2]: shopt: not found
_tmp/spec-bin/mksh: <stdin>[3]: shopt: not found
osh-byterun25 shopt -p

[osh-byterun stdout] Expected u'shopt -u nullglob\nshopt -s nullglob\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun26 noclobber off

[osh-byterun stdout] Expected 'foo\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash27 noclobber on

stdout:
0
2
stderr:
_tmp/spec-bin/dash: 5: cannot create /home/andy/git/oilshell/oil/_tmp/spec-tmp/sh-options.test.sh/no-clobber: File exists
osh27 noclobber on

[osh stdout] Expected u'0\n1\n', got '0\n0\n'

stdout:
0
0
stderr:
osh_ALT27 noclobber on

[osh_ALT stdout] Expected u'0\n1\n', got '0\n0\n'

stdout:
0
0
stderr:
osh-byterun27 noclobber on

[osh-byterun stdout] Expected u'0\n1\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash28 SHELLOPTS is updated when options are changed

stdout:
1
1
1
stderr:
+ echo
+ grep -q xtrace
+ echo 1
+ set +x
mksh28 SHELLOPTS is updated when options are changed

stdout:
1
1
1
stderr:
+ grep -q xtrace
+ echo
+ echo 1
+ set +x
osh-byterun28 SHELLOPTS is updated when options are changed

[osh-byterun stdout] Expected u'1\n0\n1\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash29 SHELLOPTS is readonly

stdout:
status=0
stderr:
mksh29 SHELLOPTS is readonly

stdout:
status=0
stderr:
osh29 SHELLOPTS is readonly

[osh stdout] Expected 'status=1\n', got ''
[osh status] Expected 0, got 1

stdout:
stderr: 
*** Error has no source location info ***
fatal: Can't assign to readonly value 'SHELLOPTS'
osh_ALT29 SHELLOPTS is readonly

[osh_ALT stdout] Expected 'status=1\n', got ''
[osh_ALT status] Expected 0, got 1

stdout:
stderr: 
*** Error has no source location info ***
fatal: Can't assign to readonly value 'SHELLOPTS'
osh-byterun29 SHELLOPTS is readonly

[osh-byterun stdout] Expected 'status=1\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh30 set -o lists options

[osh status] Expected 0, got 1

stdout:
stderr: 
osh 'set' usage error: Expected argument for option
osh_ALT30 set -o lists options

[osh_ALT status] Expected 0, got 1

stdout:
stderr: 
osh 'set' usage error: Expected argument for option
osh-byterun30 set -o lists options

[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh31 set without args lists variables

[osh status] Expected 0, got 1

stdout:
stderr: 
osh_ALT31 set without args lists variables

[osh_ALT status] Expected 0, got 1

stdout:
stderr: 
osh-byterun31 set without args lists variables

[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash32 shopt -q

stdout:
nullglob=127
nullglob=127
nullglob,failglob=127
nullglob,failglob=127
stderr:
_tmp/spec-bin/dash: 1: shopt: not found
_tmp/spec-bin/dash: 3: shopt: not found
_tmp/spec-bin/dash: 4: shopt: not found
_tmp/spec-bin/dash: 6: shopt: not found
_tmp/spec-bin/dash: 8: shopt: not found
_tmp/spec-bin/dash: 9: shopt: not found
mksh32 shopt -q

stdout:
nullglob=127
nullglob=127
nullglob,failglob=127
nullglob,failglob=127
stderr:
_tmp/spec-bin/mksh: <stdin>[1]: shopt: not found
_tmp/spec-bin/mksh: <stdin>[3]: shopt: not found
_tmp/spec-bin/mksh: <stdin>[4]: shopt: not found
_tmp/spec-bin/mksh: <stdin>[6]: shopt: not found
_tmp/spec-bin/mksh: <stdin>[8]: shopt: not found
_tmp/spec-bin/mksh: <stdin>[9]: shopt: not found
osh-byterun32 shopt -q

[osh-byterun stdout] Expected 'nullglob=1\nnullglob=0\nnullglob,failglob=1\nnullglob,failglob=0\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash33 shopt -q invalid

stdout:
invalidZZ=127
stderr:
_tmp/spec-bin/dash: 1: shopt: not found
bash33 shopt -q invalid

stdout:
invalidZZ=1
stderr:
_tmp/spec-bin/bash: line 1: shopt: invalidZZ: invalid shell option name
mksh33 shopt -q invalid

stdout:
invalidZZ=127
stderr:
_tmp/spec-bin/mksh: <stdin>[1]: shopt: not found
osh-byterun33 shopt -q invalid

[osh-byterun stdout] Expected 'invalidZZ=2\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash34 sh -i loads rcfile (when combined with -c)

stdout:
1
stderr:
_tmp/spec-bin/dash: 0: Illegal option --
mksh34 sh -i loads rcfile (when combined with -c)

stdout:
1
stderr:
_tmp/spec-bin/mksh: _tmp/spec-bin/mksh: --: unknown option
osh-byterun34 sh -i loads rcfile (when combined with -c)

[osh-byterun stdout] Expected '1\nRCFILE\n2\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend