Results for ysh-builtin-module.test.sh

statusosh
pass 16
FAIL 6
total22
caseoshdescription
0pass source-guard is an old way of preventing redefinition - could remove it
1pass is-main
2pass is-main with -c and stdin
3pass use builtin usage
4pass use --extern is a no-op, for static analysis
5pass use foo.ysh creates a value.Obj, and it's cached on later invocations
6pass procs in a module can call setglobal on globals in that module
7pass no provided names
8pass bad provide type
9pass invalid provide entries
10pass use foo.ysh creates a value.Obj with __invoke__
11pass module itself is invokable Obj, which can contain invokable obj!
12pass argument binding test
13pass module invoked without any arguments is an error
14pass module invoked with nonexistent name is error
15FAIL circular import is an error?
details
16FAIL Module with parse error
details
17pass Module with runtime error
18FAIL user can inspect __modules__ cache
details
19FAIL use foo.ysh --names a b
details
20FAIL use foo.ysh --all-provided
details
21FAIL use foo.ysh --all-for-testing
details
16 passed, 0 OK, 0 not implemented, 0 BUG, 6 failed, 0 timeouts, 0 cases skipped
6 failed under osh

Details on runs that didn't PASS

osh15 circular import is an error?

[osh stdout] Expected '', got 'hi\n'

stdout:
hi
stderr:
osh16 Module with parse error

[osh status] Expected 2, got 1

stdout:
stderr: 
  use $REPO_ROOT/spec/testdata/module2/parse-error.ysh
      ^~~~~~~~~~
[ stdin ]:3: use: couldn't find '/home/uke/oil/spec/testdata/module2/parse-error.ysh'
  use $REPO_ROOT/spec/testdata/module2/parse-error.ysh
  ^~~
[ stdin ]:3: errexit PID 37062: command.Simple failed with status 1
osh18 user can inspect __modules__ cache

[osh stdout] Expected '', got 'TODO: Dict view of realpath() string -> Obj instance\n'

stdout:
TODO: Dict view of realpath() string -> Obj instance
stderr:
osh19 use foo.ysh --names a b

[osh stdout] Expected '', got 'TODO\n'

stdout:
TODO
stderr:
osh20 use foo.ysh --all-provided

[osh stdout] Expected '', got 'TODO\n'

stdout:
TODO
stderr:
osh21 use foo.ysh --all-for-testing

[osh stdout] Expected '', got 'TODO\n'

stdout:
TODO
stderr: