spec test index / oilshell.org
| case | bash | mksh | osh | osh_ALT | osh-byterun | description |
| 0 | pass | pass | pass | pass | pass | Assignment Causes Array Decay |
| 1 | pass | pass | FAIL | FAIL | FAIL | Array Decay with IFS |
| details | details | details | ||||
| 2 | pass | pass | FAIL | FAIL | FAIL | User arrays decay |
| details | details | details | ||||
| 3 | pass | pass | FAIL | FAIL | FAIL | $a gives first element of array |
| details | details | details | ||||
| 4 | pass | pass | FAIL | FAIL | FAIL | Assign to array index without initialization |
| details | details | details | ||||
| 5 | pass | pass | FAIL | FAIL | FAIL | a[40] grows array |
| details | details | details | ||||
| 6 | pass | pass | pass | pass | pass | array decays to string when comparing with [[ a = b ]] |
| 7 | pass | pass | FAIL | FAIL | FAIL | Increment array variables |
| details | details | details | ||||
| 8 | pass | N-I | pass | pass | pass | Apply vectorized operations on ${a[*]} |
| details |
26 passed, 0 ok, 1 known unimplemented, 0 known bugs, 6 failed, 0 skipped
| osh | 1 Array Decay with IFS [osh stdout] Expected "['[x y z]']\n", got "['[ y z]']\n" stdout: ['[ y z]']stderr: |
| osh_ALT | 1 Array Decay with IFS [osh_ALT stdout] Expected "['[x y z]']\n", got "['[ y z]']\n" stdout: ['[ y z]']stderr: |
| osh-byterun | 1 Array Decay with IFS [osh-byterun stdout] Expected "['[x y z]']\n", got "['[ y z]']\n" stdout: ['[ y z]']stderr: |
| osh | 2 User arrays decay [osh stdout] Expected "['x', 'y', 'z']\n['x y z']\n['x', 'YYY', 'z']\n", got "['x', 'y', 'z']\n" [osh status] Expected 0, got 1 stdout: ['x', 'y', 'z']stderr: Unexpected error in execvpe('c[1]=YYY', ['c[1]=YYY'], ...): [Errno 2] No such file or directory
Line 8 of '<stdin>'
argv.py "${b[@]}"
^~
Can't index string with @: (Str s:'x y z')
|
| osh_ALT | 2 User arrays decay [osh_ALT stdout] Expected "['x', 'y', 'z']\n['x y z']\n['x', 'YYY', 'z']\n", got "['x', 'y', 'z']\n" [osh_ALT status] Expected 0, got 1 stdout: ['x', 'y', 'z']stderr: Unexpected error in execvpe('c[1]=YYY', ['c[1]=YYY'], ...): [Errno 2] No such file or directory
Line 8 of '<stdin>'
argv.py "${b[@]}"
^~
Can't index string with @: (Str s:'x y z')
|
| osh-byterun | 2 User arrays decay [osh-byterun stdout] Expected "['x', 'y', 'z']\n['x y z']\n['x', 'YYY', 'z']\n", got "['x', 'y', 'z']\n" [osh-byterun status] Expected 0, got 1 stdout: ['x', 'y', 'z']stderr: Unexpected error in execvpe('c[1]=YYY', ['c[1]=YYY'], ...): [Errno 2] No such file or directory
Line 8 of '<stdin>'
argv.py "${b[@]}"
^~
Can't index string with @: (Str s:'x y z')
|
| osh | 3 $a gives first element of array [osh stdout] Expected '1\n', got '1 2 3\n' stdout: 1 2 3stderr: |
| osh_ALT | 3 $a gives first element of array [osh_ALT stdout] Expected '1\n', got '1 2 3\n' stdout: 1 2 3stderr: |
| osh-byterun | 3 $a gives first element of array [osh-byterun stdout] Expected '1\n', got '1 2 3\n' stdout: 1 2 3stderr: |
| osh | 4 Assign to array index without initialization [osh stdout] Expected '5 6 2\n', got '0\n' stdout: 0stderr: Unexpected error in execvpe('a[5]=5', ['a[5]=5'], ...): [Errno 2] No such file or directory
Unexpected error in execvpe('a[6]=6', ['a[6]=6'], ...): [Errno 2] No such file or directory
|
| osh_ALT | 4 Assign to array index without initialization [osh_ALT stdout] Expected '5 6 2\n', got '0\n' stdout: 0stderr: Unexpected error in execvpe('a[5]=5', ['a[5]=5'], ...): [Errno 2] No such file or directory
Unexpected error in execvpe('a[6]=6', ['a[6]=6'], ...): [Errno 2] No such file or directory
|
| osh-byterun | 4 Assign to array index without initialization [osh-byterun stdout] Expected '5 6 2\n', got '0\n' stdout: 0stderr: Unexpected error in execvpe('a[5]=5', ['a[5]=5'], ...): [Errno 2] No such file or directory
Unexpected error in execvpe('a[6]=6', ['a[6]=6'], ...): [Errno 2] No such file or directory
|
| osh | 5 a[40] grows array [osh stdout] Expected '1 5 3 20 30 5\n', got '1 2 3 3\n' stdout: 1 2 3 3stderr: Unexpected error in execvpe('a[1]=5', ['a[1]=5'], ...): [Errno 2] No such file or directory
Unexpected error in execvpe('a[40]=30', ['a[40]=30'], ...): [Errno 2] No such file or directory
Unexpected error in execvpe('a[10]=20', ['a[10]=20'], ...): [Errno 2] No such file or directory
|
| osh_ALT | 5 a[40] grows array [osh_ALT stdout] Expected '1 5 3 20 30 5\n', got '1 2 3 3\n' stdout: 1 2 3 3stderr: Unexpected error in execvpe('a[1]=5', ['a[1]=5'], ...): [Errno 2] No such file or directory
Unexpected error in execvpe('a[40]=30', ['a[40]=30'], ...): [Errno 2] No such file or directory
Unexpected error in execvpe('a[10]=20', ['a[10]=20'], ...): [Errno 2] No such file or directory
|
| osh-byterun | 5 a[40] grows array [osh-byterun stdout] Expected '1 5 3 20 30 5\n', got '1 2 3 3\n' stdout: 1 2 3 3stderr: Unexpected error in execvpe('a[1]=5', ['a[1]=5'], ...): [Errno 2] No such file or directory
Unexpected error in execvpe('a[40]=30', ['a[40]=30'], ...): [Errno 2] No such file or directory
Unexpected error in execvpe('a[10]=20', ['a[10]=20'], ...): [Errno 2] No such file or directory
|
| osh | 7 Increment array variables [osh stdout] Expected '2 2\n', got '' [osh status] Expected 0, got 1 stdout: stderr: Traceback (most recent call last):
File "bin/osh", line 616, in <module>
main(sys.argv)
File "bin/osh", line 594, in main
sys.exit(AppBundleMain(argv))
File "bin/osh", line 568, in AppBundleMain
status = OshMain(argv0, main_argv, login_shell)
File "bin/osh", line 385, in OshMain
status = ex.ExecuteAndRunExitTrap(node)
File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1239, in ExecuteAndRunExitTrap
status = self.Execute(node)
File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1234, in Execute
status, _ = self.ExecuteAndCatch(node, fork_external=fork_external)
File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1192, in ExecuteAndCatch
status = self._Execute(node, fork_external=fork_external)
File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1164, in _Execute
status, check_errexit = self._Dispatch(node, fork_external)
File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 893, in _Dispatch
status = self._ExecuteList(node.children)
File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1185, in _ExecuteList
status = self._Execute(child) # last status wins
File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1164, in _Execute
status, check_errexit = self._Dispatch(node, fork_external)
File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 766, in _Dispatch
i = self.arith_ev.Eval(node.child)
File "/home/andy/git/oilshell/oil/bin/../core/expr_eval.py", line 271, in Eval
new_int = old_int + 1
TypeError: can only concatenate list (not "int") to list
|
| osh_ALT | 7 Increment array variables [osh_ALT stdout] Expected '2 2\n', got '' [osh_ALT status] Expected 0, got 1 stdout: stderr: Traceback (most recent call last):
File "/home/andy/git/oilshell/oil/Python-2.7.13/Lib/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/home/andy/git/oilshell/oil/Python-2.7.13/Lib/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/andy/git/oilshell/oil/bin/oil.py", line 616, in <module>
main(sys.argv)
File "/home/andy/git/oilshell/oil/bin/oil.py", line 594, in main
sys.exit(AppBundleMain(argv))
File "/home/andy/git/oilshell/oil/bin/oil.py", line 568, in AppBundleMain
status = OshMain(argv0, main_argv, login_shell)
File "/home/andy/git/oilshell/oil/bin/oil.py", line 385, in OshMain
status = ex.ExecuteAndRunExitTrap(node)
File "/home/andy/git/oilshell/oil/core/cmd_exec.py", line 1239, in ExecuteAndRunExitTrap
status = self.Execute(node)
File "/home/andy/git/oilshell/oil/core/cmd_exec.py", line 1234, in Execute
status, _ = self.ExecuteAndCatch(node, fork_external=fork_external)
File "/home/andy/git/oilshell/oil/core/cmd_exec.py", line 1192, in ExecuteAndCatch
status = self._Execute(node, fork_external=fork_external)
File "/home/andy/git/oilshell/oil/core/cmd_exec.py", line 1164, in _Execute
status, check_errexit = self._Dispatch(node, fork_external)
File "/home/andy/git/oilshell/oil/core/cmd_exec.py", line 1109, in _Dispatch
print('sys\t%.3f' % sys_, file=sys.stderr)
File "/home/andy/git/oilshell/oil/core/cmd_exec.py", line 1185, in _ExecuteList
status = self._Execute(child) # last status wins
File "/home/andy/git/oilshell/oil/core/cmd_exec.py", line 1164, in _Execute
status, check_errexit = self._Dispatch(node, fork_external)
File "/home/andy/git/oilshell/oil/core/cmd_exec.py", line 1109, in _Dispatch
print('sys\t%.3f' % sys_, file=sys.stderr)
File "/home/andy/git/oilshell/oil/core/expr_eval.py", line 271, in Eval
new_int = old_int + 1
TypeError: can only concatenate list (not "int") to list
FATAL: couldn't import from app bundle '_tmp/oil-tar-test/oil-0.6.pre3/_bin/osh' (1)
Stripping the oil.ovm binary may cause this error.
See https://github.com/oilshell/oil/issues/47
|
| osh-byterun | 7 Increment array variables [osh-byterun stdout] Expected '2 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 88, in <module>
main(sys.argv)
File "/home/andy/git/oilshell/oil/bin/opy_.py", line 72, in main
sys.exit(AppBundleMain(argv))
File "/home/andy/git/oilshell/oil/bin/opy_.py", line 64, in AppBundleMain
return opy_main.OpyCommandMain(main_argv)
File "/home/andy/git/oilshell/oil/opy/opy_main.py", line 351, in OpyCommandMain
num_ticks = ovm.run_code_object(co, opy_argv)
File "/home/andy/git/oilshell/oil/opy/byterun/execfile.py", line 36, in run_code_object
pyvm2.run_code(vm, code, f_globals=main_mod.__dict__)
File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 88, in run_code
val = vm.run_frame(frame)
File "/home/andy/git/oilshell/oil/opy/byterun/pyvm2.py", line 327, in run_frame
raise exctype, value, tb
TypeError: can only concatenate list (not "int") to list
|
| mksh | 8 Apply vectorized operations on ${a[*]} stdout: stderr: _tmp/spec-bin/mksh: <stdin>[2]: ${a[*]#-}: bad substitution
|