Results for hay.test.sh

statusoshosh_ALT
pass 1818
FAIL 55
total2323
caseoshosh_ALTdescription
0pass pass use bin
1pass pass use dialect
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()
18pass pass Code Blocks: parseHay() then shvar _DIALECT= { evalHay() }
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
36 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

osh6 Parsing Nested Attributes nodes (bug fix)

[osh stdout] Expected '', got '--- -\t2024-07-30 15:08:40.376090269 +0000\n+++ actual.txt\t2024-07-30 15:08:40.367887079 +0000\n@@ -1,3 +0,0 @@\n-{\n- "path": "LICENSE.txt"\n-}\n'

stdout:
--- -	2024-07-30 15:08:40.376090269 +0000
+++ actual.txt	2024-07-30 15:08:40.367887079 +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-07-30 15:08:40.429746832 +0000\n+++ actual.txt\t2024-07-30 15:08:40.423887307 +0000\n@@ -1,3 +0,0 @@\n-{\n- "path": "LICENSE.txt"\n-}\n'

stdout:
--- -	2024-07-30 15:08:40.429746832 +0000
+++ actual.txt	2024-07-30 15:08:40.423887307 +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-07-30 15:08:40.496467215 +0000\n+++ out.txt\t2024-07-30 15:08:40.487887568 +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-07-30 15:08:40.496467215 +0000
+++ out.txt	2024-07-30 15:08:40.487887568 +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-07-30 15:08:40.552232854 +0000\n+++ out.txt\t2024-07-30 15:08:40.543887797 +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-07-30 15:08:40.552232854 +0000
+++ out.txt	2024-07-30 15:08:40.543887797 +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-07-30 15:08:40.619402177 +0000\n+++ out.txt\t2024-07-30 15:08:40.611888075 +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-07-30 15:08:40.619402177 +0000
+++ out.txt	2024-07-30 15:08:40.611888075 +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-07-30 15:08:40.673228831 +0000\n+++ out.txt\t2024-07-30 15:08:40.663888286 +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-07-30 15:08:40.673228831 +0000
+++ out.txt	2024-07-30 15:08:40.663888286 +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)
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 31540: 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 31543: command.Simple failed with status 2