Results for ysh-builtin-module.test.sh

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

[osh stdout] Expected 'main.ysh is not the main module\nhi from main.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_
osh4 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_
osh5 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_
osh6 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_
osh7 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_
osh8 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_
osh9 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_
osh10 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_
osh11 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_
osh12 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_
osh13 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_
osh14 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_
osh15 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_
osh16 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_
osh17 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_
osh18 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_
osh19 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_
osh20 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_
osh21 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_
osh22 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_
osh23 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_
osh24 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_
osh25 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_
osh26 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_
osh27 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_
osh28 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_