32 passed, 0 OK, 0 not implemented, 0 BUG, 10 failed, 0 timeouts, 0 cases skipped 10 failed under osh
osh | 4 Parsing Nested Attributes nodes (bug fix) [osh stdout] Expected '', got '--- -\t2025-02-27 12:23:53.671747849 +0000\n+++ actual.txt\t2025-02-27 12:23:53.666477899 +0000\n@@ -1,3 +0,0 @@\n-{\n- "path": "LICENSE.txt"\n-}\n' stdout: --- - 2025-02-27 12:23:53.671747849 +0000 +++ actual.txt 2025-02-27 12:23:53.666477899 +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_ALT | 4 Parsing Nested Attributes nodes (bug fix) [osh_ALT stdout] Expected '', got '--- -\t2025-02-27 12:23:53.737833848 +0000\n+++ actual.txt\t2025-02-27 12:23:53.732478369 +0000\n@@ -1,3 +0,0 @@\n-{\n- "path": "LICENSE.txt"\n-}\n' stdout: --- - 2025-02-27 12:23:53.737833848 +0000 +++ actual.txt 2025-02-27 12:23:53.732478369 +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 | 5 hay eval Attr node, and JSON [osh stdout] Expected 'diff 0\n', got '--- -\t2025-02-27 12:23:53.809357182 +0000\n+++ out.txt\t2025-02-27 12:23:53.803478874 +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: --- - 2025-02-27 12:23:53.809357182 +0000 +++ out.txt 2025-02-27 12:23:53.803478874 +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 1stderr: json write (result) | jq . > out.txt ^~ [ stdin ]:18: 'jq' not found (OILS-ERR-100) |
osh_ALT | 5 hay eval Attr node, and JSON [osh_ALT stdout] Expected 'diff 0\n', got '--- -\t2025-02-27 12:23:53.871745045 +0000\n+++ out.txt\t2025-02-27 12:23:53.866479322 +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: --- - 2025-02-27 12:23:53.871745045 +0000 +++ out.txt 2025-02-27 12:23:53.866479322 +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 1stderr: json write (result) | jq . > out.txt ^~ [ stdin ]:18: 'jq' not found (OILS-ERR-100) |
osh | 6 hay eval shell node, and JSON [osh stdout] Expected '', got '--- -\t2025-02-27 12:23:53.940725565 +0000\n+++ out.txt\t2025-02-27 12:23:53.935479813 +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: --- - 2025-02-27 12:23:53.940725565 +0000 +++ out.txt 2025-02-27 12:23:53.935479813 +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_ALT | 6 hay eval shell node, and JSON [osh_ALT stdout] Expected '', got '--- -\t2025-02-27 12:23:54.003921638 +0000\n+++ out.txt\t2025-02-27 12:23:53.998480261 +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: --- - 2025-02-27 12:23:54.003921638 +0000 +++ out.txt 2025-02-27 12:23:53.998480261 +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 | 8 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 1 stdout: stderr: const age = '10' ^~~ [ stdin ]:10: fatal: Can't assign to readonly value 'age' |
osh_ALT | 8 haynode builtin can define nodes [osh_ALT stdout] Expected 'level 0 children\n1\nlevel 1 children\n2\nlevel 0 children\n2\n' Got '' [osh_ALT status] Expected 0, got 1 stdout: stderr: const age = '10' ^~~ [ stdin ]:10: fatal: Can't assign to readonly value 'age' |
osh | 13 Scope of Variables Inside Hay Blocks [osh stdout] Expected 'location = https://example.com/downloads/foo.tar.gz\nbackup = https://archive.example.com/downloads/foo.tar.gz\ndeps location https://example.com/downloads/spam.tar.gz\ndeps backup https://archive.example.com/downloads/spam.tar.xz\nAFTER downloads/foo.tar.gz\n' Got 'location = https://example.com/downloads/foo.tar.gz\nbackup = https://archive.example.com/downloads/foo.tar.gz\n' [osh status] Expected 0, got 1 stdout: location = https://example.com/downloads/foo.tar.gz backup = https://archive.example.com/downloads/foo.tar.gzstderr: const URL_PATH = 'downloads/spam.tar.gz' ^~~~~~~~ [ stdin ]:16: fatal: Can't assign to readonly value 'URL_PATH' |
osh_ALT | 13 Scope of Variables Inside Hay Blocks [osh_ALT stdout] Expected 'location = https://example.com/downloads/foo.tar.gz\nbackup = https://archive.example.com/downloads/foo.tar.gz\ndeps location https://example.com/downloads/spam.tar.gz\ndeps backup https://archive.example.com/downloads/spam.tar.xz\nAFTER downloads/foo.tar.gz\n' Got 'location = https://example.com/downloads/foo.tar.gz\nbackup = https://archive.example.com/downloads/foo.tar.gz\n' [osh_ALT status] Expected 0, got 1 stdout: location = https://example.com/downloads/foo.tar.gz backup = https://archive.example.com/downloads/foo.tar.gzstderr: const URL_PATH = 'downloads/spam.tar.gz' ^~~~~~~~ [ stdin ]:16: fatal: Can't assign to readonly value 'URL_PATH' |
osh | 14 Nested bare assignment [osh status] Expected 0, got 1 stdout: stderr: x = 20 ^ [ stdin ]:8: fatal: Can't assign to readonly value 'x' |
osh_ALT | 14 Nested bare assignment [osh_ALT status] Expected 0, got 1 stdout: stderr: x = 20 ^ [ stdin ]:8: fatal: Can't assign to readonly value 'x' |
osh | 20 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 |
osh_ALT | 20 Typed Args to Hay Node [osh_ALT status] Expected 0, got 3 stdout: stderr: when NAME [x > 0] { ^ [ stdin ]:6: fatal: Expected 0 typed args, but got 1 |
osh | 21 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 "backticks\neval\nTYPE TASK\nCODE \n echo `echo task backticks`\necho task backticks eval 'echo task eval'\n ___\n" stdout: backticks eval TYPE TASK CODE echo `echo task backticks` echo task backticks eval 'echo task eval' ___stderr: |
osh_ALT | 21 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 "backticks\neval\nTYPE TASK\nCODE \n echo `echo task backticks`\necho task backticks eval 'echo task eval'\n ___\n" stdout: backticks eval TYPE TASK CODE echo `echo task backticks` echo task backticks eval 'echo task eval' ___stderr: |
osh | 22 CODE node provides code_str, serialized code - issue #2050 [osh status] Expected 0, got 1 [osh stderr] Found 'Traceback (most recent' stdout: stderr: Traceback (most recent call last): File "/home/uke/oil/bin/oils_for_unix.py", line 202, in <module> sys.exit(main(sys.argv)) File "/home/uke/oil/bin/oils_for_unix.py", line 171, in main return AppBundleMain(argv) File "/home/uke/oil/bin/oils_for_unix.py", line 141, in AppBundleMain return shell.Main('osh', arg_r, environ, login_shell, loader, readline) File "/home/uke/oil/core/shell.py", line 1214, in Main cmd_flags=cmd_eval.IsMainProgram) File "/home/uke/oil/core/main_loop.py", line 375, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags) File "/home/uke/oil/osh/cmd_eval.py", line 2169, in ExecuteAndCatch status = self._Execute(node) File "/home/uke/oil/osh/cmd_eval.py", line 1968, in _Execute status = self._Dispatch(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 1695, in _Dispatch status = self._DoSimple(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 959, in _DoSimple status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags) File "/home/uke/oil/osh/cmd_eval.py", line 598, in _RunSimpleCommand run_flags) File "/home/uke/oil/core/executor.py", line 432, in RunSimpleCommand return self.RunBuiltin(builtin_i.haynode, cmd_val) File "/home/uke/oil/core/executor.py", line 313, in RunBuiltin return self.RunBuiltinProc(builtin_proc, cmd_val) File "/home/uke/oil/core/executor.py", line 323, in RunBuiltinProc status = builtin_proc.Run(cmd_val) File "/home/uke/oil/builtin/hay_ysh.py", line 429, in Run unbound_frag) File "/home/uke/oil/osh/cmd_eval.py", line 2243, in EvalCommandFrag return self._Execute(frag) # can raise FatalRuntimeError, etc. File "/home/uke/oil/osh/cmd_eval.py", line 1968, in _Execute status = self._Dispatch(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 1814, in _Dispatch status = self._ExecuteList(node.children) File "/home/uke/oil/osh/cmd_eval.py", line 2045, in _ExecuteList status = self._Execute(child) File "/home/uke/oil/osh/cmd_eval.py", line 1968, in _Execute status = self._Dispatch(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 1695, in _Dispatch status = self._DoSimple(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 959, in _DoSimple status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags) File "/home/uke/oil/osh/cmd_eval.py", line 598, in _RunSimpleCommand run_flags) File "/home/uke/oil/core/executor.py", line 432, in RunSimpleCommand return self.RunBuiltin(builtin_i.haynode, cmd_val) File "/home/uke/oil/core/executor.py", line 313, in RunBuiltin return self.RunBuiltinProc(builtin_proc, cmd_val) File "/home/uke/oil/core/executor.py", line 323, in RunBuiltinProc status = builtin_proc.Run(cmd_val) File "/home/uke/oil/builtin/hay_ysh.py", line 408, in Run lit_block.lines) File "/home/uke/oil/core/alloc.py", line 67, in SnipCodeBlock assert found_left, "Couldn't find left token" AssertionError: Couldn't find left token |
osh_ALT | 22 CODE node provides code_str, serialized code - issue #2050 [osh_ALT status] Expected 0, got 1 [osh_ALT stderr] Found 'Traceback (most recent' stdout: stderr: Traceback (most recent call last): File "/home/uke/oil/bin/oil.py", line 34, in _cpython_main_hook sys.exit(oils_for_unix.main(sys.argv)) File "/home/uke/oil/bin/oils_for_unix.py", line 171, in main return AppBundleMain(argv) File "/home/uke/oil/bin/oils_for_unix.py", line 141, in AppBundleMain return shell.Main('osh', arg_r, environ, login_shell, loader, readline) File "/home/uke/oil/core/shell.py", line 1214, in Main cmd_flags=cmd_eval.IsMainProgram) File "/home/uke/oil/core/main_loop.py", line 386, in Batch return status File "/home/uke/oil/osh/cmd_eval.py", line 2172, in ExecuteAndCatch raise # 'eval break' and 'source return.sh', etc. File "/home/uke/oil/osh/cmd_eval.py", line 1968, in _Execute status = self._Dispatch(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 1909, in _Dispatch status = self._DoTimeBlock(node) File "/home/uke/oil/osh/cmd_eval.py", line 959, in _DoSimple status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags) File "/home/uke/oil/osh/cmd_eval.py", line 598, in _RunSimpleCommand run_flags) File "/home/uke/oil/core/executor.py", line 432, in RunSimpleCommand return self.RunBuiltin(builtin_i.haynode, cmd_val) File "/home/uke/oil/core/executor.py", line 313, in RunBuiltin return self.RunBuiltinProc(builtin_proc, cmd_val) File "/home/uke/oil/core/executor.py", line 323, in RunBuiltinProc status = builtin_proc.Run(cmd_val) File "/home/uke/oil/builtin/hay_ysh.py", line 429, in Run unbound_frag) File "/home/uke/oil/osh/cmd_eval.py", line 2243, in EvalCommandFrag return self._Execute(frag) # can raise FatalRuntimeError, etc. File "/home/uke/oil/osh/cmd_eval.py", line 1968, in _Execute status = self._Dispatch(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 1814, in _Dispatch status = self._ExecuteList(node.children) File "/home/uke/oil/osh/cmd_eval.py", line 2045, in _ExecuteList status = self._Execute(child) File "/home/uke/oil/osh/cmd_eval.py", line 1968, in _Execute status = self._Dispatch(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 1909, in _Dispatch status = self._DoTimeBlock(node) File "/home/uke/oil/osh/cmd_eval.py", line 959, in _DoSimple status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags) File "/home/uke/oil/osh/cmd_eval.py", line 598, in _RunSimpleCommand run_flags) File "/home/uke/oil/core/executor.py", line 432, in RunSimpleCommand return self.RunBuiltin(builtin_i.haynode, cmd_val) File "/home/uke/oil/core/executor.py", line 313, in RunBuiltin return self.RunBuiltinProc(builtin_proc, cmd_val) File "/home/uke/oil/core/executor.py", line 323, in RunBuiltinProc status = builtin_proc.Run(cmd_val) File "/home/uke/oil/builtin/hay_ysh.py", line 431, in Run result['attrs'] = value.Dict(bindings) File "/home/uke/oil/core/alloc.py", line 67, in SnipCodeBlock assert found_left, "Couldn't find left token" AssertionError: Couldn't find left token FATAL: couldn't import from app bundle '/home/uke/oil/_tmp/oil-tar-test/oil-0.27.0/_bin/osh' (1) Stripping the oil.ovm binary may cause this error. See https://github.com/oilshell/oil/issues/47 |
osh | 23 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 0x7f04ca28ff50>}\n }\n ]\n}\n<Proc 0x7f04ca28ff50>\n" [osh status] Expected 0, got 1 stdout: (Dict) { source: null, children: [ { type: 'Package', args: ['cpython'], children: [], attrs: {version: '3.11', build: <Proc 0x7f04ca28ff50>} } ] } <Proc 0x7f04ca28ff50>stderr: echo "version=$version" ^~~~~~~~ [ stdin ]:9: fatal: Undefined variable 'version' |
osh_ALT | 23 Proc within Hay node [osh_ALT 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 0x7f26921250b8>}\n }\n ]\n}\n<Proc 0x7f26921250b8>\n" [osh_ALT status] Expected 0, got 1 stdout: (Dict) { source: null, children: [ { type: 'Package', args: ['cpython'], children: [], attrs: {version: '3.11', build: <Proc 0x7f26921250b8>} } ] } <Proc 0x7f26921250b8>stderr: echo "version=$version" ^~~~~~~~ [ stdin ]:9: fatal: Undefined variable 'version' |