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":{ --> 0x7fc20b0a2638 }}\n(Obj) {"k":42,"cycle":{"k":42,"cycle":{ --> 0x7fc20b0a2638 }}}\n(Obj) {"z":99} ==> {"k":42,"cycle":{"k":42,"cycle":{ --> 0x7fc20b0a2638 }}}\n'

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

[ysh stdout] Expected '', got 'sum = 11\n(Dict) {"x":5,"y":6}\n(List) ["a","b",42,43]\n'
[ysh status] Expected 0, got 1

stdout:
sum = 11
(Dict)   {"x":5,"y":6}
(List)   ["a","b",42,43]
stderr:
  callable a b (42, 43)
               ^
[ stdin ]:13: fatal: 'callable' appears to be external. External commands don't accept typed args (OILS-ERR-200)