spec test index / oilshell.org
| status | osh | osh_.py | osh_.cc | |
| pass | 13 | 13 | 3 | |
| ok | 2 | 2 | 0 | |
| FAIL | 1 | 1 | 13 | |
| total | 16 | 16 | 16 | |
| case | osh | osh_.py | osh_.cc | description |
| 0 | pass | pass | FAIL | unset PS4 |
| details | ||||
| 1 | FAIL | FAIL | FAIL | set -o verbose prints unevaluated code |
| details | details | details | ||
| 2 | pass | pass | FAIL | xtrace with unprintable chars |
| details | ||||
| 3 | pass | pass | FAIL | xtrace with unicode chars |
| details | ||||
| 4 | pass | pass | FAIL | xtrace with tabs |
| details | ||||
| 5 | pass | pass | FAIL | xtrace with whitespace, quotes, and backslash |
| details | ||||
| 6 | pass | pass | FAIL | xtrace with newlines |
| details | ||||
| 7 | pass | pass | FAIL | xtrace written before command executes |
| details | ||||
| 8 | pass | pass | FAIL | Assignments and assign builtins |
| details | ||||
| 9 | pass | pass | FAIL | [[ ]] |
| details | ||||
| 10 | ok | ok | FAIL | PS4 is scoped |
| details | details | details | ||
| 11 | ok | ok | FAIL | xtrace with variables in PS4 |
| details | details | details | ||
| 12 | pass | pass | pass | PS4 with unterminated ${ |
| 13 | pass | pass | pass | PS4 with unterminated $( |
| 14 | pass | pass | pass | PS4 with runtime error |
| 15 | pass | pass | FAIL | Reading $? in PS4 |
| details |
29 passed, 4 OK, 0 not implemented, 0 BUG, 15 failed, 0 timeouts, 0 cases skipped 1 failed under osh
| osh_.cc | 0 unset PS4 [osh_.cc stderr] Expected '+ echo 1\n+ unset PS4\necho 2\n', got '+ echo 1\n+ unset PS4\necho 2\n\ndumb_alloc:\n\tgNumNew = 2177\n\tgNumDelete = 197\n\tgMemPos = 72864\n\n\tgNumMalloc = 185\n\tgNumFree = 0\n\tgMemPos2 = 12176\n' stdout: 1 2stderr: + echo 1 + unset PS4 echo 2 dumb_alloc: gNumNew = 2177 gNumDelete = 197 gMemPos = 72864 gNumMalloc = 185 gNumFree = 0 gMemPos2 = 12176 |
| osh | 1 set -o verbose prints unevaluated code [osh stderr] Expected 'x=foo\ny=bar\necho $x\necho $(echo $y)\n', got 'Warning: set -o verbose not implemented\n' stdout: foo barstderr: Warning: set -o verbose not implemented |
| osh_.py | 1 set -o verbose prints unevaluated code [osh_.py stderr] Expected 'x=foo\ny=bar\necho $x\necho $(echo $y)\n', got 'Warning: set -o verbose not implemented\n' stdout: foo barstderr: Warning: set -o verbose not implemented |
| osh_.cc | 1 set -o verbose prints unevaluated code [osh_.cc stdout] Expected 'foo\nbar\n', got '' [osh_.cc stderr] Expected 'x=foo\ny=bar\necho $x\necho $(echo $y)\n', got "Warning: set -o verbose not implemented\nosh_eval.opt: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.\n" [osh_.cc status] Expected 0, got -6 stdout: stderr: Warning: set -o verbose not implemented osh_eval.opt: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed. |
| osh_.cc | 2 xtrace with unprintable chars [osh_.cc stderr] Expected "+ echo $'a\\x03b\\x04c\\x00d'\n", got "+ echo $'a\\x03b\\x04c\\x00d'\n\ndumb_alloc:\n\tgNumNew = 2103\n\tgNumDelete = 190\n\tgMemPos = 71584\n\n\tgNumMalloc = 165\n\tgNumFree = 0\n\tgMemPos2 = 11936\n" stdout: abc dstderr: + echo $'a\x03b\x04c\x00d' dumb_alloc: gNumNew = 2103 gNumDelete = 190 gMemPos = 71584 gNumMalloc = 165 gNumFree = 0 gMemPos2 = 11936 |
| osh_.cc | 3 xtrace with unicode chars [osh_.cc stderr] Expected "+ echo '[\xce\xbc]' '[\xce\xbc]'\n", got "+ echo $'[\xce\xbc]' $'[\xce\xbc]'\n\ndumb_alloc:\n\tgNumNew = 2178\n\tgNumDelete = 210\n\tgMemPos = 73440\n\n\tgNumMalloc = 176\n\tgNumFree = 0\n\tgMemPos2 = 12080\n" stdout: [μ] [μ]stderr: + echo $'[μ]' $'[μ]' dumb_alloc: gNumNew = 2178 gNumDelete = 210 gMemPos = 73440 gNumMalloc = 176 gNumFree = 0 gMemPos2 = 12080 |
| osh_.cc | 4 xtrace with tabs [osh_.cc stderr] Expected "+ echo $'[\\t]'\n", got "+ echo $'[\\t]'\n\ndumb_alloc:\n\tgNumNew = 2044\n\tgNumDelete = 182\n\tgMemPos = 69952\n\n\tgNumMalloc = 141\n\tgNumFree = 0\n\tgMemPos2 = 11520\n" stdout: [ ]stderr: + echo $'[\t]' dumb_alloc: gNumNew = 2044 gNumDelete = 182 gMemPos = 69952 gNumMalloc = 141 gNumFree = 0 gMemPos2 = 11520 |
| osh_.cc | 5 xtrace with whitespace, quotes, and backslash [osh_.cc stderr] Expected '+ echo \'1 2\' $\'\\\'\' \'"\' $\'\\\\\'\n', got '+ echo \'1 2\' $\'\\\'\' \'"\' $\'\\\\\'\n\ndumb_alloc:\n\tgNumNew = 2032\n\tgNumDelete = 189\n\tgMemPos = 69376\n\n\tgNumMalloc = 151\n\tgNumFree = 0\n\tgMemPos2 = 11632\n' stdout: 1 2 ' " \stderr: + echo '1 2' $'\'' '"' $'\\' dumb_alloc: gNumNew = 2032 gNumDelete = 189 gMemPos = 69376 gNumMalloc = 151 gNumFree = 0 gMemPos2 = 11632 |
| osh_.cc | 6 xtrace with newlines [osh_.cc stderr] Expected "+ echo $'[\\n]'\n", got "+ echo $'[\\n]'\n\ndumb_alloc:\n\tgNumNew = 1923\n\tgNumDelete = 161\n\tgMemPos = 66272\n\n\tgNumMalloc = 108\n\tgNumFree = 0\n\tgMemPos2 = 10944\n" stdout: [ ]stderr: + echo $'[\n]' dumb_alloc: gNumNew = 1923 gNumDelete = 161 gMemPos = 66272 gNumMalloc = 108 gNumFree = 0 gMemPos2 = 10944 |
| osh_.cc | 7 xtrace written before command executes [osh_.cc stderr] Expected '+ echo one\none\n+ echo two\ntwo\n', got "osh_eval.opt: cpp/posix.h:143: void posix::dup2(int, int): Assertion `0' failed.\n" [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.opt: cpp/posix.h:143: void posix::dup2(int, int): Assertion `0' failed. |
| osh_.cc | 8 Assignments and assign builtins [osh_.cc stderr] Expected '+ x=1\n+ x=2\n+ echo 2\n+ readonly x=3\n', got '+ x=1\n+ x=2\n+ echo 2\n+ readonly x=3\n\ndumb_alloc:\n\tgNumNew = 2093\n\tgNumDelete = 199\n\tgMemPos = 71088\n\n\tgNumMalloc = 126\n\tgNumFree = 0\n\tgMemPos2 = 11232\n' stdout: 2stderr: + x=1 + x=2 + echo 2 + readonly x=3 dumb_alloc: gNumNew = 2093 gNumDelete = 199 gMemPos = 71088 gNumMalloc = 126 gNumFree = 0 gMemPos2 = 11232 |
| osh_.cc | 9 [[ ]] [osh_.cc stderr] Expected "+ dir='/'\n+ [[ -d $dir ]]\n+ (( a = 42 ))\n", got "+ dir='/'\n+ [[ -d $dir ]]\nosh_eval.opt: cpp/osh_bool_stat.h:37: bool bool_stat::DoUnaryOp(id_kind_asdl::Id_t, Str*): Assertion `0' failed.\n" [osh_.cc status] Expected 0, got -6 stdout: stderr: + dir='/' + [[ -d $dir ]] osh_eval.opt: cpp/osh_bool_stat.h:37: bool bool_stat::DoUnaryOp(id_kind_asdl::Id_t, Str*): Assertion `0' failed. |
| osh | 10 PS4 is scoped stdout: one func twostderr: + echo one + f + local PS4='- ' - echo func + echo two |
| osh_.py | 10 PS4 is scoped stdout: one func twostderr: + echo one + f + local PS4='- ' - echo func + echo two |
| osh_.cc | 10 PS4 is scoped [osh_.cc stderr] Expected "+ echo one\n+ f\n+ local PS4='- '\n- echo func\n+ echo two\n", got "+ echo one\n+ f\n+ local PS4='- '\n- echo func\n+ echo two\n\ndumb_alloc:\n\tgNumNew = 2452\n\tgNumDelete = 254\n\tgMemPos = 81424\n\n\tgNumMalloc = 237\n\tgNumFree = 0\n\tgMemPos2 = 13008\n" stdout: one func twostderr: + echo one + f + local PS4='- ' - echo func + echo two dumb_alloc: gNumNew = 2452 gNumDelete = 254 gMemPos = 81424 gNumMalloc = 237 gNumFree = 0 gMemPos2 = 13008 |
| osh | 11 xtrace with variables in PS4 stdout: one twostderr: +1:x=1 +1:echo one +2:x=2 +2:echo two |
| osh_.py | 11 xtrace with variables in PS4 stdout: one twostderr: +1:x=1 +1:echo one +2:x=2 +2:echo two |
| osh_.cc | 11 xtrace with variables in PS4 [osh_.cc stderr] Expected '+1:x=1\n+1:echo one\n+2:x=2\n+2:echo two\n', got '+1:x=1\n+1:echo one\n+2:x=2\n+2:echo two\n\ndumb_alloc:\n\tgNumNew = 2227\n\tgNumDelete = 211\n\tgMemPos = 74080\n\n\tgNumMalloc = 197\n\tgNumFree = 0\n\tgMemPos2 = 12336\n' stdout: one twostderr: +1:x=1 +1:echo one +2:x=2 +2:echo two dumb_alloc: gNumNew = 2227 gNumDelete = 211 gMemPos = 74080 gNumMalloc = 197 gNumFree = 0 gMemPos2 = 12336 |
| osh_.cc | 15 Reading $? in PS4 [osh_.cc stderr] Expected '[last=0] false\n[last=1] echo ok\n', got '[last=0] false\n[last=1] echo ok\n\ndumb_alloc:\n\tgNumNew = 2020\n\tgNumDelete = 171\n\tgMemPos = 68784\n\n\tgNumMalloc = 138\n\tgNumFree = 0\n\tgMemPos2 = 11392\n' stdout: okstderr: [last=0] false [last=1] echo ok dumb_alloc: gNumNew = 2020 gNumDelete = 171 gMemPos = 68784 gNumMalloc = 138 gNumFree = 0 gMemPos2 = 11392 |