Results for ysh-object.test.sh

statusysh
pass 10
FAIL 2
total12
caseyshdescription
0pass Object() creates prototype chain
1pass prototype()
2pass propView()
3pass Mutating method lookup with ->
4pass Mutating method must be up the prototype chain, not on the object
5pass Copy to Dict with dict(), and mutate
6pass setvar obj.attr = and += and ...
7pass can't encode objects as JSON
8FAIL pretty printing of cycles
details
9pass Can all builtin methods with s.upper()
10pass invokable Obj must be have prototype containing __invoke__ of value.Proc - type -t
11FAIL Use Invokable Obj
details
10 passed, 0 OK, 0 not implemented, 0 BUG, 2 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

ysh8 pretty printing of cycles

[ysh stdout] Expected '', got '(Dict) {"k":42,"cycle":{ --> 0x7f77a2232d88 }}\n(Obj) {"k":42,"cycle":{"k":42,"cycle":{ --> 0x7f77a2232d88 }}}\n(Obj) {"z":99} ==> {"k":42,"cycle":{"k":42,"cycle":{ --> 0x7f77a2232d88 }}}\n'

stdout:
(Dict)   {"k":42,"cycle":{ --> 0x7f77a2232d88 }}
(Obj)   {"k":42,"cycle":{"k":42,"cycle":{ --> 0x7f77a2232d88 }}}
(Obj)   {"z":99} ==> {"k":42,"cycle":{"k":42,"cycle":{ --> 0x7f77a2232d88 }}}
stderr:
ysh11 Use Invokable Obj

[ysh stdout] Expected '', got 'sum = 11\n(Dict) {"x":5,"y":6}\n(List) ["a","b",42,43]\nsum = 197\n(Obj) {"x":98,"y":99} ==> {"__invoke__":<Proc>}\n(List) ["a","b",42,43]\n'

stdout:
sum = 11
(Dict)   {"x":5,"y":6}
(List)   ["a","b",42,43]
sum = 197
(Obj)   {"x":98,"y":99} ==> {"__invoke__":<Proc>}
(List)   ["a","b",42,43]
stderr: