Results for sh-options.test.sh

casedashbashmkshoshdescription
0BUG pass BUG pass can continue after unknown option
detailsdetails
1pass pass pass FAIL set with both options and argv
details
2ok pass pass pass nounset
details
3ok pass pass pass -u is nounset
details
4pass pass pass FAIL reset option with long flag
details
5pass pass pass FAIL reset option with short flag
details
6pass pass pass pass sh -c
7pass pass pass FAIL -n for no execution (useful with --ast-output)
details
8pass pass pass FAIL xtrace
details
9pass pass pass pass errexit aborts early
10pass pass pass pass errexit aborts early on pipeline
11pass pass pass pass errexit with { }
12pass pass pass pass errexit with if and { }
13pass pass pass pass errexit with ||
14pass pass pass pass errexit with &&
15pass pass pass pass errexit with !
16pass pass pass pass errexit with while/until
17N-I pass pass pass errexit with (( ))
details
18pass pass pass pass errexit with subshell
19pass BUG pass pass errexit with command sub
details
20BUG BUG BUG pass errexit with local
detailsdetailsdetails
21ok ok ok pass setting errexit while it's being ignored
detailsdetailsdetails
22pass pass pass pass setting errexit in a subshell works but doesn't affect parent shell
23ok ok ok pass setting errexit while it's being ignored in a subshell
detailsdetailsdetails
24pass pass pass pass errexit double quard
25N-I pass pass pass pipefail
details

83 passed, 8 ok, 2 known unimplemented, 6 known bugs, 5 failed, 0 skipped

Details on runs that didn't PASS

dash0 can continue after unknown option

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

stdout:
stderr: 
/bin/mksh: <stdin>[2]: set: STRICT: bad option
osh1 set with both options and argv

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

stdout:
stderr: 
Line 0 of '<unknown>'
  <no position info for token>
osh failed: 'SimpleCommand' command exited with status 1
dash2 nounset

stdout:
[]
stderr:
/bin/dash: 3: unset: parameter not set
dash3 -u is nounset

stdout:
[]
stderr:
/bin/dash: 3: unset: parameter not set
osh4 reset option with long flag

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

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 438, in <module>
    main(sys.argv)
  File "bin/osh", line 425, in main
    sys.exit(OilMain(argv))
  File "bin/osh", line 408, in OilMain
    status = OshMain(main_argv)
  File "bin/osh", line 367, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 849, in Execute
    status = self._Execute(node, fork_external=fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 833, in _Execute
    status = self._Dispatch(node, fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 631, in _Dispatch
    status = self._ExecuteList(node.children)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 842, in _ExecuteList
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 833, in _Execute
    status = self._Dispatch(node, fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 553, in _Dispatch
    status = self._RunSimpleCommand(argv, more_env, fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 469, in _RunSimpleCommand
    status = self._RunBuiltin(builtin_id, argv)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 256, in _RunBuiltin
    status = builtin._Set(argv, self.exec_opts, self.mem)
  File "/home/andy/git/oil/bin/../core/builtin.py", line 663, in _Set
    raise NotImplementedError()
NotImplementedError
osh5 reset option with short flag

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

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 438, in <module>
    main(sys.argv)
  File "bin/osh", line 425, in main
    sys.exit(OilMain(argv))
  File "bin/osh", line 408, in OilMain
    status = OshMain(main_argv)
  File "bin/osh", line 367, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 849, in Execute
    status = self._Execute(node, fork_external=fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 833, in _Execute
    status = self._Dispatch(node, fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 631, in _Dispatch
    status = self._ExecuteList(node.children)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 842, in _ExecuteList
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 833, in _Execute
    status = self._Dispatch(node, fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 553, in _Dispatch
    status = self._RunSimpleCommand(argv, more_env, fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 469, in _RunSimpleCommand
    status = self._RunBuiltin(builtin_id, argv)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 256, in _RunBuiltin
    status = builtin._Set(argv, self.exec_opts, self.mem)
  File "/home/andy/git/oil/bin/../core/builtin.py", line 660, in _Set
    raise NotImplementedError(argv)
NotImplementedError: ['-u']
osh7 -n for no execution (useful with --ast-output)

[osh status] Expected 0, got 1

stdout:
1
stderr:
Traceback (most recent call last):
  File "bin/osh", line 438, in <module>
    main(sys.argv)
  File "bin/osh", line 425, in main
    sys.exit(OilMain(argv))
  File "bin/osh", line 408, in OilMain
    status = OshMain(main_argv)
  File "bin/osh", line 367, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 849, in Execute
    status = self._Execute(node, fork_external=fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 833, in _Execute
    status = self._Dispatch(node, fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 631, in _Dispatch
    status = self._ExecuteList(node.children)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 842, in _ExecuteList
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 833, in _Execute
    status = self._Dispatch(node, fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 553, in _Dispatch
    status = self._RunSimpleCommand(argv, more_env, fork_external)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 469, in _RunSimpleCommand
    status = self._RunBuiltin(builtin_id, argv)
  File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 256, in _RunBuiltin
    status = builtin._Set(argv, self.exec_opts, self.mem)
  File "/home/andy/git/oil/bin/../core/builtin.py", line 660, in _Set
    raise NotImplementedError(argv)
NotImplementedError: ['-n']
osh8 xtrace

[osh stderr] Expected '+ echo 2\n', got ''

stdout:
1
2
stderr:
dash17 errexit with (( ))

stdout:
stderr: 
/bin/dash: 3: i++: not found
bash19 errexit with command sub

stdout:
one
two
stderr:
dash20 errexit with local

stdout:
good
bad
stderr:
bash20 errexit with local

stdout:
good
bad
stderr:
mksh20 errexit with local

stdout:
good
bad
stderr:
dash21 setting errexit while it's being ignored

stdout:
1
2
3
4
5
6
stderr:
bash21 setting errexit while it's being ignored

stdout:
1
2
3
4
5
6
stderr:
mksh21 setting errexit while it's being ignored

stdout:
1
2
3
4
5
6
stderr:
dash23 setting errexit while it's being ignored in a subshell

stdout:
1
2
3
4
5
6
stderr:
bash23 setting errexit while it's being ignored in a subshell

stdout:
1
2
3
4
5
6
stderr:
mksh23 setting errexit while it's being ignored in a subshell

stdout:
1
2
3
4
5
6
stderr:
dash25 pipefail

stdout:
0
stderr:
/bin/dash: 3: set: Illegal option -o pipefail