Results for hay.test.sh

statusosh
pass 19
FAIL 9
total28
caseoshdescription
0pass hay builtin usage
1pass hay reset
2pass hay eval can't be nested
3FAIL hay names at top level
details
4pass Parsing Nested Attributes nodes (bug fix)
5pass hay eval Attr node, and JSON
6pass hay eval shell node, and JSON
7FAIL _hay() register
details
8FAIL haynode builtin can define nodes
details
9FAIL haynode: usage errors (name or block required)
details
10pass haynode: shell nodes require block args; attribute nodes don't
11pass hay eval with shopt -s ysh:all
12pass Attr block with duplicate names
13pass Scope of Variables Inside Hay Blocks
14pass Nested bare assignment
15pass Param with same name as Hay attribute
16pass hay define and then an error
17pass parseHay()
18FAIL Code Blocks: parseHay() then shvar _DIALECT= { evalHay() }
details
19pass evalHay() usage
20FAIL Attribute / Data Blocks (package-manager)
details
21FAIL Typed Args to Hay Node
details
22pass OSH and hay (dynamic parsing)
23FAIL CODE node provides code_str, serialized code - issue #2050
details
24FAIL Proc within Hay node
details
25pass Using Hay node from another module
26pass Defining Hay node in another module
27pass Using Hay with --eval flags
19 passed, 0 OK, 0 not implemented, 0 BUG, 9 failed, 0 timeouts, 0 cases skipped
9 failed under osh

Details on runs that didn't PASS

osh3 hay names at top level

[osh stdout] Expected 'status=0\n1 one\nstatus=0\n1 two\nstatus=0\n1 three\n' Got 'status=0\n'
[osh status] Expected 0 Got 2

stdout:
status=0
stderr:
  write --sep ' ' $[len(_hay()['children'])] @args
                       ^
[ stdin ]:10: Unexpected token after arithmetic expression (Id.Arith_LParen != Id.Arith_RBracket)
osh7 _hay() register

[osh stdout] Expected '1\n2\n0\n' Got ''
[osh status] Expected 0 Got 2

stdout:
stderr: 
    write -- $[len(_hay()['children'])]
                  ^
[ stdin ]:10: Unexpected token after arithmetic expression (Id.Arith_LParen != Id.Arith_RBracket)
osh8 haynode builtin can define nodes

[osh stdout] Expected 'level 0 children\n1\nlevel 1 children\n2\nlevel 0 children\n2\n' Got ''
[osh status] Expected 0 Got 2

stdout:
stderr: 
  write -- 'level 0 children' $[len(result['children'])]
                                   ^
[ stdin ]:21: Unexpected token after arithmetic expression (Id.Arith_LParen != Id.Arith_RBracket)
osh9 haynode: usage errors (name or block required)

[osh stdout] Expected 'haynode attr 2\nLEN 0\nhaynode code 2\nLEN 0\n---\ndefine attr 2\nLEN 0\ndefine code 2\nLEN 0\n' Got 'haynode attr 2\n'
[osh status] Expected 0 Got 2

stdout:
haynode attr 2
stderr:
      haynode package
      ^~~~~~~
[ stdin ]:6: 'haynode' expected at least 1 arg, or a literal block { }
  echo "LEN $[len(result['children'])]"
                 ^
[ stdin ]:11: Unexpected token after arithmetic expression (Id.Arith_LParen != Id.Arith_RBracket)
osh18 Code Blocks: parseHay() then shvar _DIALECT= { evalHay() }

[osh stdout] Expected 'level 0 children\n2\n---\nchild 0\nTASK\ncpp\n---\nchild 1\nTASK\npublish-html\n---\n' Got ''
[osh status] Expected 0 Got 2

stdout:
stderr: 
  write 'level 0 children' $[len(children)] ---
                                ^
[ stdin ]:13: Unexpected token after arithmetic expression (Id.Arith_LParen != Id.Arith_RBracket)
osh20 Attribute / Data Blocks (package-manager)

[osh stdout] Expected 'level 0 children\n3\nlevel 1 children\n0\n' Got ''
[osh status] Expected 0 Got 2

stdout:
stderr: 
  write 'level 0 children' $[len(d['children'])]
                                ^
[ stdin ]:9: Unexpected token after arithmetic expression (Id.Arith_LParen != Id.Arith_RBracket)
osh21 Typed Args to Hay Node

[osh status] Expected 0 Got 3

stdout:
stderr: 
  when NAME [x > 0] {
             ^
[ stdin ]:6: fatal: Expected 0 typed args, but got 1
osh23 CODE node provides code_str, serialized code - issue #2050

[osh stdout] Expected '' Got "(Dict)\n{\n source: null,\n children: [\n {\n type: 'Package',\n args: [],\n children: [\n {\n type: 'INSTALL',\n args: [],\n location_str: '[ stdin ]',\n location_start_line: 8,\n code_str: b' \\n\\n cd dist {\\n ./install\\n }\\n '\n }\n ],\n attrs: {name: 'osh'}\n }\n ]\n}\n"

stdout:
(Dict)
{
    source: null,
    children: [
        {
            type: 'Package',
            args: [],
            children: [
                {
                    type: 'INSTALL',
                    args: [],
                    location_str: '[ stdin ]',
                    location_start_line: 8,
                    code_str: b'           \n\n    cd dist {\n      ./install\n    }\n  '
                }
            ],
            attrs: {name: 'osh'}
        }
    ]
}
stderr:
osh24 Proc within Hay node

[osh stdout] Expected '' Got "(Dict)\n{\n source: null,\n children: [\n {\n type: 'Package',\n args: ['cpython'],\n children: [],\n attrs: {version: '3.11', build: <Proc 0x7fad147928c0>}\n }\n ]\n}\n<Proc 0x7fad147928c0>\nversion=3.11\n"
[osh status] Expected 0 Got 127

stdout:
(Dict)
{
    source: null,
    children: [
        {
            type: 'Package',
            args: ['cpython'],
            children: [],
            attrs: {version: '3.11', build: <Proc 0x7fad147928c0>}
        }
    ]
}
<Proc 0x7fad147928c0>
version=3.11
stderr:
      make
      ^~~~
[ stdin ]:10: Command 'make' not found (OILS-ERR-100)
[ stdin ]:10: errexit PID 43442: Command failed with status 127