Results for hay.test.sh

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

Details on runs that didn't PASS

osh4 Parsing Nested Attributes nodes (bug fix)

[osh stdout] Expected '', got '--- -\t2024-11-11 05:27:34.081862897 +0000\n+++ actual.txt\t2024-11-11 05:27:34.072678878 +0000\n@@ -1,3 +0,0 @@\n-{\n- "path": "LICENSE.txt"\n-}\n'

stdout:
--- -	2024-11-11 05:27:34.081862897 +0000
+++ actual.txt	2024-11-11 05:27:34.072678878 +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_ALT4 Parsing Nested Attributes nodes (bug fix)

[osh_ALT stdout] Expected '', got '--- -\t2024-11-11 05:27:34.132282884 +0000\n+++ actual.txt\t2024-11-11 05:27:34.124679113 +0000\n@@ -1,3 +0,0 @@\n-{\n- "path": "LICENSE.txt"\n-}\n'

stdout:
--- -	2024-11-11 05:27:34.132282884 +0000
+++ actual.txt	2024-11-11 05:27:34.124679113 +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)
osh5 hay eval Attr node, and JSON

[osh stdout] Expected 'diff 0\n', got '--- -\t2024-11-11 05:27:34.195541422 +0000\n+++ out.txt\t2024-11-11 05:27:34.184679384 +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-11-11 05:27:34.195541422 +0000
+++ out.txt	2024-11-11 05:27:34.184679384 +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_ALT5 hay eval Attr node, and JSON

[osh_ALT stdout] Expected 'diff 0\n', got '--- -\t2024-11-11 05:27:34.247530059 +0000\n+++ out.txt\t2024-11-11 05:27:34.236679618 +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-11-11 05:27:34.247530059 +0000
+++ out.txt	2024-11-11 05:27:34.236679618 +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)
osh6 hay eval shell node, and JSON

[osh stdout] Expected '', got '--- -\t2024-11-11 05:27:34.309789994 +0000\n+++ out.txt\t2024-11-11 05:27:34.300679908 +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-11-11 05:27:34.309789994 +0000
+++ out.txt	2024-11-11 05:27:34.300679908 +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_ALT6 hay eval shell node, and JSON

[osh_ALT stdout] Expected '', got '--- -\t2024-11-11 05:27:34.358399185 +0000\n+++ out.txt\t2024-11-11 05:27:34.348680124 +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-11-11 05:27:34.358399185 +0000
+++ out.txt	2024-11-11 05:27:34.348680124 +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)
osh19 Typed Args to Hay Node

[osh status] Expected 0, got 1

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

[osh_ALT status] Expected 0, got 1

stdout:
stderr: 
  when NAME (x > 0) {
             ^
[ stdin ]:6: fatal: Undefined variable 'x'
osh20 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 38416: command.Simple failed with status 2
osh_ALT20 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 38419: command.Simple failed with status 2