Results for ysh-builtin-module.test.sh

statusosh
FAIL 28
total28
caseoshdescription
0FAIL source-guard is an old way of preventing redefinition - could remove it
details
1FAIL is-main
details
2FAIL is-main with -c and stdin
details
3FAIL use builtin usage
details
4FAIL use usage with --pick etc.
details
5FAIL use --extern is a no-op, for static analysis
details
6FAIL use foo.ysh creates a value.Obj, and it's cached on later invocations
details
7FAIL procs in a module can call setglobal on globals in that module
details
8FAIL no provided names
details
9FAIL bad provide type
details
10FAIL invalid provide entries
details
11FAIL use foo.ysh creates a value.Obj with __invoke__
details
12FAIL module itself is invokable Obj, which can contain invokable obj!
details
13FAIL argument binding test
details
14FAIL module-with-hyphens
details
15FAIL modules can access __builtins__ directly
details
16FAIL use may only be used a TOP level, not within proc
details
17FAIL Mutable variables are frozen - beware!
details
18FAIL module invoked without any arguments is an error
details
19FAIL module invoked with nonexistent name is error
details
20FAIL circular import doesn't result in infinite loop, or crash
details
21FAIL Module with parse error
details
22FAIL Module with runtime error
details
23FAIL user can inspect __modules__ cache
details
24FAIL use foo.ysh --pick a b
details
25FAIL use foo.ysh --pick nonexistent
details
26FAIL use foo.ysh --all-provided
details
27FAIL use foo.ysh --all-for-testing
details
0 passed, 0 OK, 0 not implemented, 0 BUG, 28 failed, 0 timeouts, 0 cases skipped
28 failed under osh

Details on runs that didn't PASS

osh0 source-guard is an old way of preventing redefinition - could remove it

[osh stdout] Expected 'common\nmodule1\n', got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh1 is-main

[osh stdout] Expected 'lib.ysh is not the main module\nhi from main.ysh\nhi from lib.ysh\n' Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh2 is-main with -c and stdin

[osh stdout] Expected '-c\nstatus=0\nstdin\nstatus=0\n', got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh3 use builtin usage

[osh stdout] Expected 'no-arg=2\none-arg=1\nextern=0\nbad-flag=2\ntoo-many=2\nno-builtin=1\n' Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh4 use usage with --pick etc.

[osh stdout] Expected 'bad-flag=2\nall-provided=2\nall-for-testing=2\n\nno-picked=2\npicked=0\n' Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh5 use --extern is a no-op, for static analysis

[osh stdout] Expected 'status=0\nstatus=0\n', got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh6 use foo.ysh creates a value.Obj, and it's cached on later invocations

[osh stdout] Expected 'caller_no_leak = null\n(List) ["util",("MY_INTEGER":42,"log":<Proc>,"die":<Proc>,"setvar_noleak":"util.ysh","setglobal_noleak":"util.ysh","invokableObj":("x":3,"y":4) --> ("__invoke__":<Proc>)) --> ("__invoke__":<BuiltinProc>)]\n(List) ["repeated",("MY_INTEGER":42,"log":<Proc>,"die":<Proc>,"setvar_noleak":"util.ysh","setglobal_noleak":"util.ysh","invokableObj":("x":3,"y":4) --> ("__invoke__":<Proc>)) --> ("__invoke__":<BuiltinProc>)]\n(List) ["symlink",("MY_INTEGER":42,"log":<Proc>,"die":<Proc>,"setvar_noleak":"util.ysh","setglobal_noleak":"util.ysh","invokableObj":("x":3,"y":4) --> ("__invoke__":<Proc>)) --> ("__invoke__":<BuiltinProc>)]\nsetvar_noleak null\nsetglobal_noleak null\n' Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh7 procs in a module can call setglobal on globals in that module

[osh stdout] Expected 'g1 = g1\ng1 = proc mutated\n\ng2 = g2\ng2 = func mutated\n\nglobals.g1 = null\nglobals.g2 = null\n\nimporter g1 = null\nimporter g2 = null\n' Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh8 no provided names

[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh9 bad provide type

[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh10 invalid provide entries

[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh11 use foo.ysh creates a value.Obj with __invoke__

[osh stdout] Expected 'caller_no_leak = null\nlog hello\ndie hello there\n' Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh12 module itself is invokable Obj, which can contain invokable obj!

[osh stdout] Expected 'caller_no_leak = null\nsum = 8\n', got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh13 argument binding test

[osh stdout] Expected '(List) ["w1","w2"]\n(List) ["w3","w4"]\n\n(List) [3,4]\n(List) [5,6]\n\n(List) [7,8]\n(Dict) {"n3":9}\n\n<Command>\n---\n(List) ["w1","w2"]\n(List) []\n\n(List) [3,4]\n(List) []\n\n(List) [42,43]\n(Dict) {"n3":9}\n\n<Command>\n' Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh14 module-with-hyphens

[osh stdout] Expected '[for-xtrace]\ncounter = 5\ncounter = 6\n(Int) 6\n' Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh15 modules can access __builtins__ directly

[osh stdout] Expected '(Int) 3\n', got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh16 use may only be used a TOP level, not within proc

[osh status] Expected 2, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh17 Mutable variables are frozen - beware!

[osh stdout] Expected '[for-xtrace]\ncounter = 5\ncounter = 6\n(Int) 6\ncounter = 7\n(Int) 6\ncounter = 8\n' Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh18 module invoked without any arguments is an error

[osh stdout] Expected 'caller_no_leak = null\n', got ''
[osh status] Expected 2, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh19 module invoked with nonexistent name is error

[osh stdout] Expected 'caller_no_leak = null\n', got ''
[osh status] Expected 2, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh20 circular import doesn't result in infinite loop, or crash

[osh stdout] Expected '(Obj) ("c1":"c1") --> ("__invoke__":<BuiltinProc>)\n(Obj) ("c2":"c2") --> ("__invoke__":<BuiltinProc>)\nhi\n' Got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh21 Module with parse error

[osh status] Expected 2, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh22 Module with runtime error

[osh stdout] Expected 'runtime-error before\n', got ''
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh23 user can inspect __modules__ cache

[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh24 use foo.ysh --pick a b

[osh stdout] Expected '(Int) 3\n(Int) 2\n', got ''
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh25 use foo.ysh --pick nonexistent

[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh26 use foo.ysh --all-provided

[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_
osh27 use foo.ysh --all-for-testing

[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 20, in <module>
    import posix_ as posix
ImportError: No module named posix_