Results for oil-func-proc.test.sh

statusosh
pass 17
FAIL 7
total24
caseoshdescription
0pass Untyped func
1pass Typed func
2pass func: default values for positional params
3FAIL pass too many positional params to func (without spread)
details
4pass Positional Spread
5pass pass named arg to func
6FAIL Func with missing named param with no default
details
7FAIL Func passed wrong named param
details
8pass Named Spread
9pass Func with varargs
10pass return expression then return builtin
11pass Open proc (any number of args)
12FAIL Closed proc with no args, passed too many
details
13pass Open proc has "$@"
14pass Closed proc doesn't have "$@"
15pass Proc with default args
16pass Proc with explicit args
17pass Proc with varargs
18pass Proc name-with-hyphen
19pass Proc with block arg
20pass inline function calls with spread, named args, etc.
21FAIL basic lambda
details
22FAIL proc returning wrong type
details
23FAIL proc returning invalid string
details
17 passed, 0 OK, 0 not implemented, 0 BUG, 7 failed, 0 timeouts, 0 cases skipped
7 failed under osh

Details on runs that didn't PASS

osh3 pass too many positional params to func (without spread)

[osh stderr] Found 'Traceback (most recent'

stdout:
f=3
stderr:
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 375, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 319, in main
    return AppBundleMain(argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 278, in AppBundleMain
    loader, line_input)
  File "/home/andy/git/oilshell/oil/core/shell.py", line 684, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch
    is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1438, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1318, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 665, in _Dispatch
    py_val = self.expr_ev.EvalExpr(node.rhs)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_eval.py", line 496, in EvalExpr
    ret = func(*pos_args, **named_args)
  File "/home/andy/git/oilshell/oil/oil_lang/objects.py", line 160, in __call__
    return self.cmd_ev.RunOilFunc(self, args, kwargs)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1649, in RunOilFunc
    (node.name.val, n_params, n_args))
TypeError: func 'add' expected 2 arguments, but got 3
osh6 Func with missing named param with no default

[osh stderr] Found 'Traceback (most recent'

stdout:
verbose
5
stderr:
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 375, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 319, in main
    return AppBundleMain(argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 278, in AppBundleMain
    loader, line_input)
  File "/home/andy/git/oilshell/oil/core/shell.py", line 684, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch
    is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1438, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1318, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 665, in _Dispatch
    py_val = self.expr_ev.EvalExpr(node.rhs)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_eval.py", line 496, in EvalExpr
    ret = func(*pos_args, **named_args)
  File "/home/andy/git/oilshell/oil/oil_lang/objects.py", line 160, in __call__
    return self.cmd_ev.RunOilFunc(self, args, kwargs)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1663, in RunOilFunc
    "value" % name.val)
TypeError: Named argument 'verbose' wasn't passed, and it doesn't have a default value
osh7 Func passed wrong named param

[osh stderr] Found 'Traceback (most recent'

stdout:
x=5
stderr:
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 375, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 319, in main
    return AppBundleMain(argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 278, in AppBundleMain
    loader, line_input)
  File "/home/andy/git/oilshell/oil/core/shell.py", line 684, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch
    is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1438, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1318, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 665, in _Dispatch
    py_val = self.expr_ev.EvalExpr(node.rhs)
  File "/home/andy/git/oilshell/oil/oil_lang/expr_eval.py", line 496, in EvalExpr
    ret = func(*pos_args, **named_args)
  File "/home/andy/git/oilshell/oil/oil_lang/objects.py", line 160, in __call__
    return self.cmd_ev.RunOilFunc(self, args, kwargs)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1676, in RunOilFunc
    (node.name.val, ', '.join(kwargs.keys())))
TypeError: func 'add' got unexpected named arguments: verbose
osh12 Closed proc with no args, passed too many

[osh stderr] Found 'Traceback (most recent'

stdout:
status=42
stderr:
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 375, in <module>
    sys.exit(main(sys.argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 319, in main
    return AppBundleMain(argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 278, in AppBundleMain
    loader, line_input)
  File "/home/andy/git/oilshell/oil/core/shell.py", line 684, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch
    is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1438, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1318, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 570, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 481, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/core/executor.py", line 226, in RunSimpleCommand
    status = self.cmd_ev.RunOilProc(val.obj, argv[1:])
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1575, in RunOilProc
    (node.name.val, n_params, n_args))
TypeError: proc 'f' expected 0 arguments, but got 2
osh21 basic lambda

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

stdout:
stderr: 
FATAL: NotImplementedError()
osh22 proc returning wrong type

[osh status] Expected 0, got 1

stdout:
stderr: 
['one', 'two']
osh23 proc returning invalid string

[osh status] Expected 0, got 1

stdout:
stderr: 
not an integer status