Results for ysh-func.test.sh

statusyshysh_ALT
pass 3029
FAIL 01
total3030
caseyshysh_ALTdescription
0pass pass Identity function
1pass pass Too many args
2pass pass Too few args
3pass pass Positional args
4pass pass named args
5pass pass Named args with ...rest
6pass pass Spread/splat of named args: f(...more)
7pass pass Multiple spreads
8pass pass Proc-style return in a func is error
9pass pass Typed return in a proc is error
10pass pass Redefining functions is not allowed (with shopt -u redefine_proc_func)
11pass pass Redefining functions is allowed (with shopt -s redefine_proc_func)
12pass pass Functions cannot redefine readonly vars (even with shopt -s redefine_proc_func)
13pass pass Functions can redefine non-readonly vars
14pass pass Vars cannot redefine functions (even with shopt -s redefine_proc_func)
15pass pass Multiple func calls
16pass pass Undefined var in function
17pass pass Param binding semantics
18pass pass Recursive functions
19pass FAIL Recursive functions with LRU Cache
details
20pass pass Varadic arguments, no other args
21pass pass Varadic arguments, other args
22pass pass Varadic arguments, too few args
23pass pass Userland max
24pass pass Functions share a namespace with variables
25pass pass We can store funcs in dictionaries
26pass pass Functions cannot be nested
27pass pass Functions can be shadowed
28pass pass Function names cannot be redeclared
29pass pass Functions cannot be mutated
59 passed, 0 OK, 0 not implemented, 0 BUG, 1 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

ysh_ALT19 Recursive functions with LRU Cache

[ysh_ALT stdout] Expected 'hit: 1\nhit: 2\nhit: 3\nhit: 4\nhit: 5\nhit: 6\nhit: 7\nhit: 8\n55\n[\n [\n 7,\n 13\n ],\n [\n 9,\n 34\n ],\n [\n 8,\n 21\n ],\n [\n 10,\n 55\n ]\n]\n' Got ''
[ysh_ALT status] Expected 0, got 1
[ysh_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 137, in AppBundleMain
    return shell.Main('ysh', arg_r, environ, login_shell, loader, readline)
  File "/home/uke/oil/core/shell.py", line 1138, 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 1953, in ExecuteAndCatch
    raise  # 'eval break' and 'source return.sh', etc.
  File "/home/uke/oil/osh/cmd_eval.py", line 1825, in _Execute
    errexit_loc = process_sub_st.locs[i]
  File "/home/uke/oil/osh/cmd_eval.py", line 1536, 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/ysh' (1)
Stripping the oil.ovm binary may cause this error.
See https://github.com/oilshell/oil/issues/47