Results for hay.test.sh

statusoshosh_ALT
pass 1616
FAIL 77
total2323
caseoshosh_ALTdescription
0pass pass use bin
1FAIL FAIL use dialect
detailsdetails
2pass pass hay builtin usage
3pass pass hay reset
4pass pass hay eval can't be nested
5pass pass hay names at top level
6FAIL FAIL Parsing Nested Attributes nodes (bug fix)
detailsdetails
7FAIL FAIL hay eval Attr node, and JSON
detailsdetails
8FAIL FAIL hay eval shell node, and JSON
detailsdetails
9pass pass _hay() register
10pass pass haynode builtin can define nodes
11pass pass haynode: usage errors (name or block required)
12pass pass haynode: shell nodes require block args; attribute nodes don't
13pass pass hay eval with shopt -s oil:all
14pass pass Attr block with duplicate names
15pass pass Scope of Variables Inside Hay Blocks
16pass pass hay define and then an error
17pass pass parseHay()
18FAIL FAIL Code Blocks: parseHay() then shvar _DIALECT= { evalHay() }
detailsdetails
19pass pass evalHay() usage
20pass pass Attribute / Data Blocks (package-manager)
21FAIL FAIL Typed Args to Hay Node
detailsdetails
22FAIL FAIL OSH and hay (dynamic parsing)
detailsdetails
32 passed, 0 OK, 0 not implemented, 0 BUG, 7 failed, 0 timeouts, 0 cases skipped
7 failed under osh

Details on runs that didn't PASS

osh1 use dialect

[osh stdout] Expected 'status=2\nstatus=1\nstatus=1\nstatus=0\n', got 'status=2\nstatus=1\n'
[osh status] Expected 0, got 1

stdout:
status=2
status=1
stderr:
  proc shvar (...args;;; block) {
  ^~~~
stdlib/ysh/shvar.ysh:1: proc is a YSH keyword, but this is OSH.
  use dialect
  ^~~
[ stdin ]:5: 'use' expected dialect name
  use dialect ninja
              ^~~~~
[ stdin ]:8: Expected dialect 'ninja'
  shvar _DIALECT=oops {
                      ^
[ stdin ]:11: fatal: 'shvar' appears to be external. External commands don't accept typed args (OILS-ERR-200)
osh_ALT1 use dialect

[osh_ALT stdout] Expected 'status=2\nstatus=1\nstatus=1\nstatus=0\n', got 'status=2\nstatus=1\n'
[osh_ALT status] Expected 0, got 1

stdout:
status=2
status=1
stderr:
  source --builtin ysh/shvar.ysh
                   ^~~
[ stdin ]:3: source failed: No builtin file 'stdlib/ysh/shvar.ysh'
  use dialect
  ^~~
[ stdin ]:5: 'use' expected dialect name
  use dialect ninja
              ^~~~~
[ stdin ]:8: Expected dialect 'ninja'
  shvar _DIALECT=oops {
                      ^
[ stdin ]:11: fatal: 'shvar' appears to be external. External commands don't accept typed args (OILS-ERR-200)
osh6 Parsing Nested Attributes nodes (bug fix)

[osh stdout] Expected '', got '--- -\t2024-08-12 18:21:12.688431413 +0000\n+++ actual.txt\t2024-08-12 18:21:12.682550469 +0000\n@@ -1,3 +0,0 @@\n-{\n- "path": "LICENSE.txt"\n-}\n'

stdout:
--- -	2024-08-12 18:21:12.688431413 +0000
+++ actual.txt	2024-08-12 18:21:12.682550469 +0000
@@ -1,3 +0,0 @@
-{
-  "path": "LICENSE.txt"
-}
stderr:
  json write (_hay()) | jq '.children[0].children[0].attrs' > actual.txt
                        ^~
[ stdin ]:15: 'jq' not found (OILS-ERR-100)
  invalid = 'syntax'  # parse error
          ^
[ stdin ]:23: Unexpected = (Hint: use var/setvar, or quote it)
osh_ALT6 Parsing Nested Attributes nodes (bug fix)

[osh_ALT stdout] Expected '', got '--- -\t2024-08-12 18:21:12.737622644 +0000\n+++ actual.txt\t2024-08-12 18:21:12.730550580 +0000\n@@ -1,3 +0,0 @@\n-{\n- "path": "LICENSE.txt"\n-}\n'

stdout:
--- -	2024-08-12 18:21:12.737622644 +0000
+++ actual.txt	2024-08-12 18:21:12.730550580 +0000
@@ -1,3 +0,0 @@
-{
-  "path": "LICENSE.txt"
-}
stderr:
  json write (_hay()) | jq '.children[0].children[0].attrs' > actual.txt
                        ^~
[ stdin ]:15: 'jq' not found (OILS-ERR-100)
  invalid = 'syntax'  # parse error
          ^
[ stdin ]:23: Unexpected = (Hint: use var/setvar, or quote it)
osh7 hay eval Attr node, and JSON

[osh stdout] Expected 'diff 0\n', got '--- -\t2024-08-12 18:21:12.800536544 +0000\n+++ out.txt\t2024-08-12 18:21:12.794550728 +0000\n@@ -1,29 +0,0 @@\n-{\n- "source": null,\n- "children": [\n- {\n- "type": "Package",\n- "args": [\n- "foo"\n- ],\n- "children": [],\n- "attrs": {\n- "int": 42,\n- "bool": true,\n- "mynull": null,\n- "mystr": "spam\\n",\n- "mylist": [\n- 5,\n- "foo",\n- {}\n- ]\n- }\n- },\n- {\n- "type": "User",\n- "args": [\n- "alice"\n- ]\n- }\n- ]\n-}\ndiff 1\n'

stdout:
--- -	2024-08-12 18:21:12.800536544 +0000
+++ out.txt	2024-08-12 18:21:12.794550728 +0000
@@ -1,29 +0,0 @@
-{
-  "source": null,
-  "children": [
-    {
-      "type": "Package",
-      "args": [
-        "foo"
-      ],
-      "children": [],
-      "attrs": {
-        "int": 42,
-        "bool": true,
-        "mynull": null,
-        "mystr": "spam\n",
-        "mylist": [
-          5,
-          "foo",
-          {}
-        ]
-      }
-    },
-    {
-      "type": "User",
-      "args": [
-        "alice"
-      ]
-    }
-  ]
-}
diff 1
stderr:
  json write (result) | jq . > out.txt
                        ^~
[ stdin ]:18: 'jq' not found (OILS-ERR-100)
osh_ALT7 hay eval Attr node, and JSON

[osh_ALT stdout] Expected 'diff 0\n', got '--- -\t2024-08-12 18:21:12.851817772 +0000\n+++ out.txt\t2024-08-12 18:21:12.842550839 +0000\n@@ -1,29 +0,0 @@\n-{\n- "source": null,\n- "children": [\n- {\n- "type": "Package",\n- "args": [\n- "foo"\n- ],\n- "children": [],\n- "attrs": {\n- "int": 42,\n- "bool": true,\n- "mynull": null,\n- "mystr": "spam\\n",\n- "mylist": [\n- 5,\n- "foo",\n- {}\n- ]\n- }\n- },\n- {\n- "type": "User",\n- "args": [\n- "alice"\n- ]\n- }\n- ]\n-}\ndiff 1\n'

stdout:
--- -	2024-08-12 18:21:12.851817772 +0000
+++ out.txt	2024-08-12 18:21:12.842550839 +0000
@@ -1,29 +0,0 @@
-{
-  "source": null,
-  "children": [
-    {
-      "type": "Package",
-      "args": [
-        "foo"
-      ],
-      "children": [],
-      "attrs": {
-        "int": 42,
-        "bool": true,
-        "mynull": null,
-        "mystr": "spam\n",
-        "mylist": [
-          5,
-          "foo",
-          {}
-        ]
-      }
-    },
-    {
-      "type": "User",
-      "args": [
-        "alice"
-      ]
-    }
-  ]
-}
diff 1
stderr:
  json write (result) | jq . > out.txt
                        ^~
[ stdin ]:18: 'jq' not found (OILS-ERR-100)
osh8 hay eval shell node, and JSON

[osh stdout] Expected '', got '--- -\t2024-08-12 18:21:12.913037740 +0000\n+++ out.txt\t2024-08-12 18:21:12.906550987 +0000\n@@ -1,19 +0,0 @@\n-{\n- "source": null,\n- "children": [\n- {\n- "type": "TASK",\n- "args": [],\n- "location_str": "[ stdin ]",\n- "location_start_line": 6,\n- "code_str": " echo hi "\n- },\n- {\n- "type": "TASK",\n- "args": [],\n- "location_str": "[ stdin ]",\n- "location_start_line": 8,\n- "code_str": " \\n echo one\\n echo two\\n "\n- }\n- ]\n-}\n'
[osh status] Expected 0, got 1

stdout:
--- -	2024-08-12 18:21:12.913037740 +0000
+++ out.txt	2024-08-12 18:21:12.906550987 +0000
@@ -1,19 +0,0 @@
-{
-  "source": null,
-  "children": [
-    {
-      "type": "TASK",
-      "args": [],
-      "location_str": "[ stdin ]",
-      "location_start_line": 6,
-      "code_str": "         echo hi "
-    },
-    {
-      "type": "TASK",
-      "args": [],
-      "location_str": "[ stdin ]",
-      "location_start_line": 8,
-      "code_str": "        \n    echo one\n    echo two\n  "
-    }
-  ]
-}
stderr:
  json write (result) | jq . > out.txt
                        ^~
[ stdin ]:14: 'jq' not found (OILS-ERR-100)
osh_ALT8 hay eval shell node, and JSON

[osh_ALT stdout] Expected '', got '--- -\t2024-08-12 18:21:12.962143273 +0000\n+++ out.txt\t2024-08-12 18:21:12.954551098 +0000\n@@ -1,19 +0,0 @@\n-{\n- "source": null,\n- "children": [\n- {\n- "type": "TASK",\n- "args": [],\n- "location_str": "[ stdin ]",\n- "location_start_line": 6,\n- "code_str": " echo hi "\n- },\n- {\n- "type": "TASK",\n- "args": [],\n- "location_str": "[ stdin ]",\n- "location_start_line": 8,\n- "code_str": " \\n echo one\\n echo two\\n "\n- }\n- ]\n-}\n'
[osh_ALT status] Expected 0, got 1

stdout:
--- -	2024-08-12 18:21:12.962143273 +0000
+++ out.txt	2024-08-12 18:21:12.954551098 +0000
@@ -1,19 +0,0 @@
-{
-  "source": null,
-  "children": [
-    {
-      "type": "TASK",
-      "args": [],
-      "location_str": "[ stdin ]",
-      "location_start_line": 6,
-      "code_str": "         echo hi "
-    },
-    {
-      "type": "TASK",
-      "args": [],
-      "location_str": "[ stdin ]",
-      "location_start_line": 8,
-      "code_str": "        \n    echo one\n    echo two\n  "
-    }
-  ]
-}
stderr:
  json write (result) | jq . > out.txt
                        ^~
[ stdin ]:14: 'jq' not found (OILS-ERR-100)
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 1

stdout:
stderr: 
    if (len(args) === 0) {
           ^
stdlib/ysh/shvar.ysh:3: Unexpected left paren (might need a space before it)
  shvar _DIALECT=sourcehut {
                           ^
[ stdin ]:10: fatal: 'shvar' appears to be external. External commands don't accept typed args (OILS-ERR-200)
osh_ALT18 Code Blocks: parseHay() then shvar _DIALECT= { evalHay() }

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

stdout:
stderr: 
  source --builtin ysh/shvar.ysh
                   ^~~
[ stdin ]:3: source failed: No builtin file 'stdlib/ysh/shvar.ysh'
  shvar _DIALECT=sourcehut {
                           ^
[ stdin ]:10: fatal: 'shvar' appears to be external. External commands don't accept typed args (OILS-ERR-200)
osh21 Typed Args to Hay Node

[osh status] Expected 0, got 1

stdout:
stderr: 
  when NAME (x > 0) {
             ^
[ stdin ]:6: fatal: Undefined variable 'x'
osh_ALT21 Typed Args to Hay Node

[osh_ALT status] Expected 0, got 1

stdout:
stderr: 
  when NAME (x > 0) {
             ^
[ stdin ]:6: fatal: Undefined variable 'x'
osh22 OSH and hay (dynamic parsing)

[osh stdout] Expected "backticks\neval\nTYPE TASK\nCODE \n echo `echo task backticks`\n eval 'echo task eval'\n ___\n" Got ''
[osh status] Expected 0, got 2

stdout:
stderr: 
    b[1]=1
    ^~
/home/uke/oil/spec/testdata/config/osh-hay.osh:14: Use var/setvar to assign in YSH
  source $REPO_ROOT/spec/testdata/config/osh-hay.osh
  ^~~~~~
[ stdin ]:1: errexit PID 35496: command.Simple failed with status 2
osh_ALT22 OSH and hay (dynamic parsing)

[osh_ALT stdout] Expected "backticks\neval\nTYPE TASK\nCODE \n echo `echo task backticks`\n eval 'echo task eval'\n ___\n" Got ''
[osh_ALT status] Expected 0, got 2

stdout:
stderr: 
    b[1]=1
    ^~
/home/uke/oil/test/../spec/testdata/config/osh-hay.osh:14: Use var/setvar to assign in YSH
  source $REPO_ROOT/spec/testdata/config/osh-hay.osh
  ^~~~~~
[ stdin ]:1: errexit PID 35499: command.Simple failed with status 2