Results for ysh-builtin-error.test.sh

statusysh
FAIL 20
total20
caseyshdescription
0FAIL User errors behave like builtin errors
details
1FAIL _error register is initially empty dict
details
2FAIL error builtin sets _error.message, which can be used by programs
details
3FAIL error builtin adds named args as properties on _error Dict
details
4FAIL Errors within multiple functions
details
5FAIL Impact of errors on var declaration
details
6FAIL default error code is 10
details
7FAIL error code should be an integer
details
8FAIL Error code should be named arg, not positional
details
9FAIL error cannot take word args
details
10FAIL error requires arguments
details
11FAIL error cannot have a code of 0
details
12FAIL try { error oops }
details
13FAIL Handle _error.code
details
14FAIL failed builtin usage
details
15FAIL failed builtin
details
16FAIL assert on values
details
17FAIL assert on expressions
details
18FAIL assert on expression that fails
details
19FAIL assert on chained comparison expression is not special
details
0 passed, 0 OK, 0 not implemented, 0 BUG, 20 failed, 0 timeouts, 0 cases skipped
20 failed under osh

Details on runs that didn't PASS

ysh0 User errors behave like builtin errors

[ysh stdout] Expected 'status=3\n', got ''
[ysh status] Expected 3, got 1
[ysh 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_
ysh1 _error register is initially empty dict

[ysh stdout] Expected 'Dict\n0\n', got ''
[ysh status] Expected 0, got 1
[ysh 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_
ysh2 error builtin sets _error.message, which can be used by programs

[ysh stdout] Expected 'status=3\nmessage=divide by zero: 42 / 0\nstatus=3\nmessage=divide by zero: 5 / 0\n' Got ''
[ysh status] Expected 0, got 1
[ysh 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_
ysh3 error builtin adds named args as properties on _error Dict

[ysh stdout] Expected '(Dict) {"code":99,"message":"bad"}\n(Dict) {"myData":{"spam":"eggs"},"code":99,"message":"bad"}\n(Dict) {"message":"bad","code":99}\n' Got ''
[ysh status] Expected 0, got 1
[ysh 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_
ysh4 Errors within multiple functions

[ysh status] Expected 10, got 1
[ysh 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_
ysh5 Impact of errors on var declaration

[ysh 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_
ysh6 default error code is 10

[ysh status] Expected 10, got 1
[ysh 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_
ysh7 error code should be an integer

[ysh status] Expected 3, got 1
[ysh 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_
ysh8 Error code should be named arg, not positional

[ysh status] Expected 3, got 1
[ysh 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_
ysh9 error cannot take word args

[ysh status] Expected 3, got 1
[ysh 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_
ysh10 error requires arguments

[ysh status] Expected 2, got 1
[ysh 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_
ysh11 error cannot have a code of 0

[ysh status] Expected 2, got 1
[ysh 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_
ysh12 try { error oops }

[ysh stdout] Expected 'status=10\n', got ''
[ysh status] Expected 0, got 1
[ysh 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_
ysh13 Handle _error.code

[ysh stdout] Expected 'PASS\nCASE PASS\n', got ''
[ysh status] Expected 0, got 1
[ysh 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_
ysh14 failed builtin usage

[ysh stdout] Expected 'ok\nstatus=2\nok\nstatus=2\n', got ''
[ysh status] Expected 0, got 1
[ysh 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_
ysh15 failed builtin

[ysh stdout] Expected 'hi\nok 1\nok 2\n', got ''
[ysh status] Expected 0, got 1
[ysh 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_
ysh16 assert on values

[ysh stdout] Expected 'passed\ncode 0\n\n\ncode 3\n\n\ncode 3\n\n\ncode 3\n\npassed\ncode 0\n\n' Got ''
[ysh status] Expected 0, got 1
[ysh 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_
ysh17 assert on expressions

[ysh stdout] Expected 'passed\ncode 0\n\ncode 3\n\ncode 3\n\n\ncode 3\n\npassed\ncode 0\n\n' Got ''
[ysh status] Expected 0, got 1
[ysh 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_
ysh18 assert on expression that fails

[ysh stdout] Expected 'code 3\n\ncode 1\n\n', got ''
[ysh status] Expected 0, got 1
[ysh 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_
ysh19 assert on chained comparison expression is not special

[ysh stdout] Expected 'code 3\n\n', got ''
[ysh status] Expected 0, got 1
[ysh 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_