Results for ysh-expr.test.sh

statusoshosh_ALT
pass 4442
FAIL 02
total4444
caseoshosh_ALTdescription
0pass pass command sub $(echo hi)
1pass pass shell array %(a 'b c')
2pass pass empty array and simple_word_eval (regression test)
3pass pass Empty array and assignment builtin (regression)
4pass pass Shell arrays support tilde detection, static globbing, brace detection
5pass pass Set $HOME using 'var' (i.e. Oil string var in word evaluator)
6pass pass Use shell var in Oil expression
7pass pass Length doesn't apply to BashArray
8pass pass $[len(x)] inside strings
9pass FAIL Func with multiple args in multiple contexts
details
10pass FAIL Trailing Comma in Param list
details
11pass pass nested expr contexts
12pass pass YSH var used with shell arithmetic
13pass pass Parse { var x = 42 }
14pass pass double quoted
15pass pass double quoted respects strict_array
16pass pass simple var sub $name $0 $1 $? etc.
17pass pass braced var sub ${x:-default}
18pass pass braced var sub respects strict_array
19pass pass null / true / false
20pass pass Integer literals
21pass pass Integer literals with underscores
22pass pass Exponentiation with **
23pass pass Float Division
24pass pass Integer Division (rounds toward zero)
25pass pass % operator is remainder
26pass pass Bitwise logical
27pass pass Shift operators
28pass pass multiline strings, list, tuple syntax for list, etc.
29pass pass multiline dict
30pass pass multiline array and command sub (only here docs disallowed)
31pass pass obj->method()
32pass pass obj->method does NOT give you a bound method
33pass pass d.key
34pass pass a ++ b for string/list concatenation
35pass pass s ~~ glob and s !~~ glob
36pass pass Type Errors
37pass pass can't use ++ on integers
38pass pass can't do mystr ++ mylist
39pass pass expression literals
40pass pass No list comprehension in ^[]
41pass pass expression literals, evaluation failure
42pass pass expression literals, lazy evaluation
43pass pass expression literals, sugar for strings
86 passed, 0 OK, 0 not implemented, 0 BUG, 0 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh_ALT9 Func with multiple args in multiple contexts

[osh_ALT stdout] Expected '7 7\n', got ''
[osh_ALT status] Expected 0, got 1
[osh_ALT stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oil.py", line 34, in _cpython_main_hook
    sys.exit(oils_for_unix.main(sys.argv))
  File "/home/uke/oil/bin/oils_for_unix.py", line 170, in main
    return AppBundleMain(argv)
  File "/home/uke/oil/bin/oils_for_unix.py", line 140, in AppBundleMain
    return shell.Main('osh', arg_r, environ, login_shell, loader, readline)
  File "/home/uke/oil/core/shell.py", line 1137, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/uke/oil/core/main_loop.py", line 375, in Batch
    return status
  File "/home/uke/oil/osh/cmd_eval.py", line 1957, in ExecuteAndCatch
    raise  # 'eval break' and 'source return.sh', etc.
  File "/home/uke/oil/osh/cmd_eval.py", line 1829, in _Execute
    errexit_loc = process_sub_st.locs[i]
  File "/home/uke/oil/osh/cmd_eval.py", line 1540, in _Dispatch
    status = self._DoExpandedAlias(node)
  File "/home/uke/oil/osh/cmd_eval.py", line 827, in _DoSimple
    status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags)
  File "/home/uke/oil/osh/cmd_eval.py", line 518, in _RunSimpleCommand
    run_flags)
  File "/home/uke/oil/core/executor.py", line 327, in RunSimpleCommand
    return self.RunBuiltin(builtin_id, cmd_val)
  File "/home/uke/oil/core/executor.py", line 211, in RunBuiltin
    status = builtin_func.Run(cmd_val)
  File "/home/uke/oil/builtin/meta_osh.py", line 158, in Run
    resolved = path_arg
IndexError: list index out of range
FATAL: couldn't import from app bundle '/home/uke/oil/_tmp/oil-tar-test/oil-0.22.0/_bin/osh' (1)
Stripping the oil.ovm binary may cause this error.
See https://github.com/oilshell/oil/issues/47
osh_ALT10 Trailing Comma in Param list

[osh_ALT stdout] Expected '7 7\n', got ''
[osh_ALT status] Expected 0, got 1
[osh_ALT stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oil.py", line 34, in _cpython_main_hook
    sys.exit(oils_for_unix.main(sys.argv))
  File "/home/uke/oil/bin/oils_for_unix.py", line 170, in main
    return AppBundleMain(argv)
  File "/home/uke/oil/bin/oils_for_unix.py", line 140, in AppBundleMain
    return shell.Main('osh', arg_r, environ, login_shell, loader, readline)
  File "/home/uke/oil/core/shell.py", line 1137, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/uke/oil/core/main_loop.py", line 375, in Batch
    return status
  File "/home/uke/oil/osh/cmd_eval.py", line 1957, in ExecuteAndCatch
    raise  # 'eval break' and 'source return.sh', etc.
  File "/home/uke/oil/osh/cmd_eval.py", line 1829, in _Execute
    errexit_loc = process_sub_st.locs[i]
  File "/home/uke/oil/osh/cmd_eval.py", line 1540, in _Dispatch
    status = self._DoExpandedAlias(node)
  File "/home/uke/oil/osh/cmd_eval.py", line 827, in _DoSimple
    status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags)
  File "/home/uke/oil/osh/cmd_eval.py", line 518, in _RunSimpleCommand
    run_flags)
  File "/home/uke/oil/core/executor.py", line 327, in RunSimpleCommand
    return self.RunBuiltin(builtin_id, cmd_val)
  File "/home/uke/oil/core/executor.py", line 211, in RunBuiltin
    status = builtin_func.Run(cmd_val)
  File "/home/uke/oil/builtin/meta_osh.py", line 158, in Run
    resolved = path_arg
IndexError: list index out of range
FATAL: couldn't import from app bundle '/home/uke/oil/_tmp/oil-tar-test/oil-0.22.0/_bin/osh' (1)
Stripping the oil.ovm binary may cause this error.
See https://github.com/oilshell/oil/issues/47