spec test index / oilshell.org
2 passed, 0 OK, 0 not implemented, 0 BUG, 19 failed, 0 timeouts, 0 cases skipped 19 failed under osh
osh | 0 Customize PS4 [osh stderr] Expected '5 . builtin echo 1\n5 . builtin echo 2\n6 . builtin echo 3\n' Got 'builtin echo 1\nbuiltin echo 2\nbuiltin echo 3\n' stdout: 1 2 3stderr: builtin echo 1 builtin echo 2 builtin echo 3 |
osh_ALT | 0 Customize PS4 [osh_ALT stderr] Expected '5 . builtin echo 1\n5 . builtin echo 2\n6 . builtin echo 3\n' Got 'builtin echo 1\nbuiltin echo 2\nbuiltin echo 3\n' stdout: 1 2 3stderr: builtin echo 1 builtin echo 2 builtin echo 3 |
osh | 1 xtrace_details doesn't show [[ ]] etc. [osh stderr] Expected '. builtin cd /\n', got 'builtin cd /\n' stdout: stderr: builtin cd / |
osh_ALT | 1 xtrace_details doesn't show [[ ]] etc. [osh_ALT stderr] Expected '. builtin cd /\n', got 'builtin cd /\n' stdout: stderr: builtin cd / |
osh | 2 xtrace_details AND xtrace_rich on [osh stderr] Expected "| command 12345: env 'false'\n; process 12345: status 1\n. builtin set '+x'\n" Got "command 12345: env 'false'\nprocess 12345: status 1\nbuiltin set '+x'\n" stdout: stderr: command 12345: env 'false' process 12345: status 1 builtin set '+x' |
osh_ALT | 2 xtrace_details AND xtrace_rich on [osh_ALT stderr] Expected "| command 12345: env 'false'\n; process 12345: status 1\n. builtin set '+x'\n" Got "command 12345: env 'false'\nprocess 12345: status 1\nbuiltin set '+x'\n" stdout: stderr: command 12345: env 'false' process 12345: status 1 builtin set '+x' |
osh | 3 proc and shell function [osh stderr] Expected "> proc shfunc 1\n . builtin ':' 1\n< proc shfunc\n> proc p 2\n . builtin ':' 2\n< proc p\n" Got "proc shfunc 1\nbuiltin ':' 1\nproc shfunc\nproc p 2\nbuiltin ':' 2\nproc p\n" stdout: stderr: proc shfunc 1 builtin ':' 1 proc shfunc proc p 2 builtin ':' 2 proc p |
osh_ALT | 3 proc and shell function [osh_ALT stderr] Expected "> proc shfunc 1\n . builtin ':' 1\n< proc shfunc\n> proc p 2\n . builtin ':' 2\n< proc p\n" Got "proc shfunc 1\nbuiltin ':' 1\nproc shfunc\nproc p 2\nbuiltin ':' 2\nproc p\n" stdout: stderr: proc shfunc 1 builtin ':' 1 proc shfunc proc p 2 builtin ':' 2 proc p |
osh | 4 eval [osh stderr] Expected '> eval\n . builtin echo 1\n . builtin echo 2\n< eval\n' Got 'eval\nbuiltin echo 1\nbuiltin echo 2\neval\n' stdout: 1 2stderr: eval builtin echo 1 builtin echo 2 eval |
osh_ALT | 4 eval [osh_ALT stderr] Expected '> eval\n . builtin echo 1\n . builtin echo 2\n< eval\n' Got 'eval\nbuiltin echo 1\nbuiltin echo 2\neval\n' stdout: 1 2stderr: eval builtin echo 1 builtin echo 2 eval |
osh | 5 source [osh stderr] Expected "> source lib.sh a b c\n . builtin echo '$1 = a'\n< source lib.sh\n> source lib.sh x $'\\xfe' $'\\xff'\n . builtin echo '$1 = x'\n< source lib.sh\n" Got "source lib.sh a b c\nbuiltin echo '$1 = a'\nsource lib.sh\nsource lib.sh x $'\\xfe' $'\\xff'\nbuiltin echo '$1 = x'\nsource lib.sh\n" stdout: $1 = a $1 = xstderr: source lib.sh a b c builtin echo '$1 = a' source lib.sh source lib.sh x $'\xfe' $'\xff' builtin echo '$1 = x' source lib.sh |
osh_ALT | 5 source [osh_ALT stderr] Expected "> source lib.sh a b c\n . builtin echo '$1 = a'\n< source lib.sh\n> source lib.sh x $'\\xfe' $'\\xff'\n . builtin echo '$1 = x'\n< source lib.sh\n" Got "source lib.sh a b c\nbuiltin echo '$1 = a'\nsource lib.sh\nsource lib.sh x $'\\xfe' $'\\xff'\nbuiltin echo '$1 = x'\nsource lib.sh\n" stdout: $1 = a $1 = xstderr: source lib.sh a b c builtin echo '$1 = a' source lib.sh source lib.sh x $'\xfe' $'\xff' builtin echo '$1 = x' source lib.sh |
osh | 6 external and builtin [osh stderr] Expected "| command 12345: env 'false'\n; process 12345: status 1\n. builtin 'true'\n. builtin set '+x'\n" Got "command 12345: env 'false'\nprocess 12345: status 1\nbuiltin 'true'\nbuiltin set '+x'\n" stdout: stderr: command 12345: env 'false' process 12345: status 1 builtin 'true' builtin set '+x' |
osh_ALT | 6 external and builtin [osh_ALT stderr] Expected "| command 12345: env 'false'\n; process 12345: status 1\n. builtin 'true'\n. builtin set '+x'\n" Got "command 12345: env 'false'\nprocess 12345: status 1\nbuiltin 'true'\nbuiltin set '+x'\n" stdout: stderr: command 12345: env 'false' process 12345: status 1 builtin 'true' builtin set '+x' |
osh | 7 subshell [osh stderr] Expected " . 12345 builtin ':' p\n + 12345 exit 3\n . 12345 builtin ':' 1\n < 12345 proc p\n > 12345 proc p\n. builtin ':' begin\n. builtin set '+x'\n; process 12345: status 3\n| forkwait 12345\n" Got "builtin ':' 1\nbuiltin ':' begin\nbuiltin ':' p\nbuiltin set '+x'\nexit 3\nforkwait 12345\nproc p\nproc p\nprocess 12345: status 3\n" stdout: stderr: builtin ':' 1 builtin ':' begin builtin ':' p builtin set '+x' exit 3 forkwait 12345 proc p proc p process 12345: status 3 |
osh_ALT | 7 subshell [osh_ALT stderr] Expected " . 12345 builtin ':' p\n + 12345 exit 3\n . 12345 builtin ':' 1\n < 12345 proc p\n > 12345 proc p\n. builtin ':' begin\n. builtin set '+x'\n; process 12345: status 3\n| forkwait 12345\n" Got "builtin ':' 1\nbuiltin ':' begin\nbuiltin ':' p\nbuiltin set '+x'\nexit 3\nforkwait 12345\nproc p\nproc p\nprocess 12345: status 3\n" stdout: stderr: builtin ':' 1 builtin ':' begin builtin ':' p builtin set '+x' exit 3 forkwait 12345 proc p proc p process 12345: status 3 |
osh | 8 command sub [osh stderr] Expected " . 12345 builtin echo bar\n. builtin echo 'foo=bar'\n. builtin set '+x'\n; process 12345: status 0\n| command sub 12345\n" Got "builtin echo 'foo=bar'\nbuiltin echo bar\nbuiltin set '+x'\ncommand sub 12345\nprocess 12345: status 0\n" stdout: foo=barstderr: builtin echo 'foo=bar' builtin echo bar builtin set '+x' command sub 12345 process 12345: status 0 |
osh_ALT | 8 command sub [osh_ALT stderr] Expected " . 12345 builtin echo bar\n. builtin echo 'foo=bar'\n. builtin set '+x'\n; process 12345: status 0\n| command sub 12345\n" Got "builtin echo 'foo=bar'\nbuiltin echo bar\nbuiltin set '+x'\ncommand sub 12345\nprocess 12345: status 0\n" stdout: foo=barstderr: builtin echo 'foo=bar' builtin echo bar builtin set '+x' command sub 12345 process 12345: status 0 |
osh | 9 process sub (nondeterministic) [osh stderr] Expected " . 12345 builtin echo 1\n . 12345 exec seq 2\n. builtin ':' begin\n. builtin set '+x'\n; process 12345: status 0\n; process 12345: status 0\n; process 12345: status 0\n| command 12345: cat /dev/fd/N /dev/fd/N\n| proc sub 12345\n| proc sub 12345\n" Got "builtin ':' begin\nbuiltin echo 1\nbuiltin set '+x'\ncommand 12345: cat /dev/fd/N /dev/fd/N\nexec seq 2\nproc sub 12345\nproc sub 12345\nprocess 12345: status 0\nprocess 12345: status 0\nprocess 12345: status 0\n" stdout: 1 2 1stderr: builtin ':' begin builtin echo 1 builtin set '+x' command 12345: cat /dev/fd/N /dev/fd/N exec seq 2 proc sub 12345 proc sub 12345 process 12345: status 0 process 12345: status 0 process 12345: status 0 |
osh_ALT | 9 process sub (nondeterministic) [osh_ALT stderr] Expected " . 12345 builtin echo 1\n . 12345 exec seq 2\n. builtin ':' begin\n. builtin set '+x'\n; process 12345: status 0\n; process 12345: status 0\n; process 12345: status 0\n| command 12345: cat /dev/fd/N /dev/fd/N\n| proc sub 12345\n| proc sub 12345\n" Got "builtin ':' begin\nbuiltin echo 1\nbuiltin set '+x'\ncommand 12345: cat /dev/fd/N /dev/fd/N\nexec seq 2\nproc sub 12345\nproc sub 12345\nprocess 12345: status 0\nprocess 12345: status 0\nprocess 12345: status 0\n" stdout: 1 2 1stderr: builtin ':' begin builtin echo 1 builtin set '+x' command 12345: cat /dev/fd/N /dev/fd/N exec seq 2 proc sub 12345 proc sub 12345 process 12345: status 0 process 12345: status 0 process 12345: status 0 |
osh | 10 pipeline (nondeterministic) [osh stderr] Expected " . 12345 builtin echo 1\n . 12345 builtin echo 2\n . 12345 exec sort\n < 12345 proc myfunc\n > 12345 proc myfunc\n ; process 12345: status 0\n ; process 12345: status 0\n ; process 12345: status 0\n | command 12345: wc -l\n | part 12345\n | part 12345\n. builtin ':' begin\n. builtin set '+x'\n< pipeline\n> pipeline\n" Got "builtin ':' begin\nbuiltin echo 1\nbuiltin echo 2\nbuiltin set '+x'\ncommand 12345: wc -l\nexec sort\npart 12345\npart 12345\npipeline\npipeline\nproc myfunc\nproc myfunc\nprocess 12345: status 0\nprocess 12345: status 0\nprocess 12345: status 0\n" stdout: 2stderr: builtin ':' begin builtin echo 1 builtin echo 2 builtin set '+x' command 12345: wc -l exec sort part 12345 part 12345 pipeline pipeline proc myfunc proc myfunc process 12345: status 0 process 12345: status 0 process 12345: status 0 |
osh_ALT | 10 pipeline (nondeterministic) [osh_ALT stderr] Expected " . 12345 builtin echo 1\n . 12345 builtin echo 2\n . 12345 exec sort\n < 12345 proc myfunc\n > 12345 proc myfunc\n ; process 12345: status 0\n ; process 12345: status 0\n ; process 12345: status 0\n | command 12345: wc -l\n | part 12345\n | part 12345\n. builtin ':' begin\n. builtin set '+x'\n< pipeline\n> pipeline\n" Got "builtin ':' begin\nbuiltin echo 1\nbuiltin echo 2\nbuiltin set '+x'\ncommand 12345: wc -l\nexec sort\npart 12345\npart 12345\npipeline\npipeline\nproc myfunc\nproc myfunc\nprocess 12345: status 0\nprocess 12345: status 0\nprocess 12345: status 0\n" stdout: 2stderr: builtin ':' begin builtin echo 1 builtin echo 2 builtin set '+x' command 12345: wc -l exec sort part 12345 part 12345 pipeline pipeline proc myfunc proc myfunc process 12345: status 0 process 12345: status 0 process 12345: status 0 |
osh | 11 singleton pipeline [osh stderr] Expected ". builtin ':' begin\n. builtin 'false'\n. builtin ':' end\n" Got "builtin ':' begin\nbuiltin 'false'\nbuiltin ':' end\n" stdout: stderr: builtin ':' begin builtin 'false' builtin ':' end |
osh_ALT | 11 singleton pipeline [osh_ALT stderr] Expected ". builtin ':' begin\n. builtin 'false'\n. builtin ':' end\n" Got "builtin ':' begin\nbuiltin 'false'\nbuiltin ':' end\n" stdout: stderr: builtin ':' begin builtin 'false' builtin ':' end |
osh | 12 Background pipeline (separate code path) [osh stderr] Expected " . 12345 builtin echo 1\n . 12345 builtin echo 2\n . 12345 exec grep ZZZ\n . 12345 exec sort\n ; process 12345: status 0\n ; process 12345: status 0\n ; process 12345: status 1\n < 12345 proc myfunc\n > 12345 proc myfunc\n. builtin ':' begin\n. builtin echo 'status=0'\n. builtin set '+x'\n< wait\n> wait\n[%1] PGID 12345 Done\n| part 12345\n| part 12345\n| part 12345\n" Got "[%1] PGID 12345 Done\nbuiltin ':' begin\nbuiltin echo 'status=0'\nbuiltin echo 1\nbuiltin echo 2\nbuiltin set '+x'\nexec grep ZZZ\nexec sort\npart 12345\npart 12345\npart 12345\nproc myfunc\nproc myfunc\nprocess 12345: status 0\nprocess 12345: status 0\nprocess 12345: status 1\nwait\nwait\n" stdout: status=0stderr: [%1] PGID 12345 Done builtin ':' begin builtin echo 'status=0' builtin echo 1 builtin echo 2 builtin set '+x' exec grep ZZZ exec sort part 12345 part 12345 part 12345 proc myfunc proc myfunc process 12345: status 0 process 12345: status 0 process 12345: status 1 wait wait |
osh_ALT | 12 Background pipeline (separate code path) [osh_ALT stderr] Expected " . 12345 builtin echo 1\n . 12345 builtin echo 2\n . 12345 exec grep ZZZ\n . 12345 exec sort\n ; process 12345: status 0\n ; process 12345: status 0\n ; process 12345: status 1\n < 12345 proc myfunc\n > 12345 proc myfunc\n. builtin ':' begin\n. builtin echo 'status=0'\n. builtin set '+x'\n< wait\n> wait\n[%1] PGID 12345 Done\n| part 12345\n| part 12345\n| part 12345\n" Got "[%1] PGID 12345 Done\nbuiltin ':' begin\nbuiltin echo 'status=0'\nbuiltin echo 1\nbuiltin echo 2\nbuiltin set '+x'\nexec grep ZZZ\nexec sort\npart 12345\npart 12345\npart 12345\nproc myfunc\nproc myfunc\nprocess 12345: status 0\nprocess 12345: status 0\nprocess 12345: status 1\nwait\nwait\n" stdout: status=0stderr: [%1] PGID 12345 Done builtin ':' begin builtin echo 'status=0' builtin echo 1 builtin echo 2 builtin set '+x' exec grep ZZZ exec sort part 12345 part 12345 part 12345 proc myfunc proc myfunc process 12345: status 0 process 12345: status 0 process 12345: status 1 wait wait |
osh | 13 Background process with fork and & (nondeterministic) [osh stderr] Expected " . 12345 exec sleep 0.1\n . 12345 exec sleep 0.1\n ; process 12345: status 0\n ; process 12345: status 0\n. builtin fork\n. builtin set '+x'\n. builtin shopt -s 'ysh:upgrade'\n< wait\n< wait\n> wait\n> wait\n[%1] PID 12345 Done\n[%1] PID 12345 Done\n| fork 12345\n| fork 12345\n" Got "[%1] PID 12345 Done\n[%1] PID 12345 Done\nbuiltin fork\nbuiltin set '+x'\nbuiltin shopt -s 'ysh:upgrade'\nexec sleep 0.1\nexec sleep 0.1\nfork 12345\nfork 12345\nprocess 12345: status 0\nprocess 12345: status 0\nwait\nwait\nwait\nwait\n" stdout: stderr: [%1] PID 12345 Done [%1] PID 12345 Done builtin fork builtin set '+x' builtin shopt -s 'ysh:upgrade' exec sleep 0.1 exec sleep 0.1 fork 12345 fork 12345 process 12345: status 0 process 12345: status 0 wait wait wait wait |
osh_ALT | 13 Background process with fork and & (nondeterministic) [osh_ALT stderr] Expected " . 12345 exec sleep 0.1\n . 12345 exec sleep 0.1\n ; process 12345: status 0\n ; process 12345: status 0\n. builtin fork\n. builtin set '+x'\n. builtin shopt -s 'ysh:upgrade'\n< wait\n< wait\n> wait\n> wait\n[%1] PID 12345 Done\n[%1] PID 12345 Done\n| fork 12345\n| fork 12345\n" Got "[%1] PID 12345 Done\n[%1] PID 12345 Done\nbuiltin fork\nbuiltin set '+x'\nbuiltin shopt -s 'ysh:upgrade'\nexec sleep 0.1\nexec sleep 0.1\nfork 12345\nfork 12345\nprocess 12345: status 0\nprocess 12345: status 0\nwait\nwait\nwait\nwait\n" stdout: stderr: [%1] PID 12345 Done [%1] PID 12345 Done builtin fork builtin set '+x' builtin shopt -s 'ysh:upgrade' exec sleep 0.1 exec sleep 0.1 fork 12345 fork 12345 process 12345: status 0 process 12345: status 0 wait wait wait wait |
osh | 14 Here doc [osh stderr] Expected ". builtin ':' begin\n| command 12345: tac\n; process 12345: status 0\n. builtin set '+x'\n" Got "builtin ':' begin\ncommand 12345: tac\nprocess 12345: status 0\nbuiltin set '+x'\n" stdout: 2 3stderr: builtin ':' begin command 12345: tac process 12345: status 0 builtin set '+x' |
osh_ALT | 14 Here doc [osh_ALT stderr] Expected ". builtin ':' begin\n| command 12345: tac\n; process 12345: status 0\n. builtin set '+x'\n" Got "builtin ':' begin\ncommand 12345: tac\nprocess 12345: status 0\nbuiltin set '+x'\n" stdout: 2 3stderr: builtin ':' begin command 12345: tac process 12345: status 0 builtin set '+x' |
osh | 15 Two here docs [osh stderr] Expected "| command 12345: cat - /dev/fd/3\n; process 12345: status 0\n. builtin set '+x'\n" Got "command 12345: cat - /dev/fd/3\nprocess 12345: status 0\nbuiltin set '+x'\n" stdout: xx yy zzstderr: command 12345: cat - /dev/fd/3 process 12345: status 0 builtin set '+x' |
osh_ALT | 15 Two here docs [osh_ALT stderr] Expected "| command 12345: cat - /dev/fd/3\n; process 12345: status 0\n. builtin set '+x'\n" Got "command 12345: cat - /dev/fd/3\nprocess 12345: status 0\nbuiltin set '+x'\n" stdout: xx yy zzstderr: command 12345: cat - /dev/fd/3 process 12345: status 0 builtin set '+x' |
osh | 17 Control Flow [osh stderr] Expected '. builtin echo 1\n. builtin echo 2\n+ break 1\n. builtin echo a y\n+ continue 1\n. builtin echo a z\n. builtin echo b y\n+ continue 1\n. builtin echo b z\n> proc zero\n + return 0\n< proc zero\n' Got 'builtin echo 1\nbuiltin echo 2\nbreak 1\nbuiltin echo a y\ncontinue 1\nbuiltin echo a z\nbuiltin echo b y\ncontinue 1\nbuiltin echo b z\nproc zero\nreturn 0\nproc zero\n' stdout: 1 2 a y a z b y b zstderr: builtin echo 1 builtin echo 2 break 1 builtin echo a y continue 1 builtin echo a z builtin echo b y continue 1 builtin echo b z proc zero return 0 proc zero |
osh_ALT | 17 Control Flow [osh_ALT stderr] Expected '. builtin echo 1\n. builtin echo 2\n+ break 1\n. builtin echo a y\n+ continue 1\n. builtin echo a z\n. builtin echo b y\n+ continue 1\n. builtin echo b z\n> proc zero\n + return 0\n< proc zero\n' Got 'builtin echo 1\nbuiltin echo 2\nbreak 1\nbuiltin echo a y\ncontinue 1\nbuiltin echo a z\nbuiltin echo b y\ncontinue 1\nbuiltin echo b z\nproc zero\nreturn 0\nproc zero\n' stdout: 1 2 a y a z b y b zstderr: builtin echo 1 builtin echo 2 break 1 builtin echo a y continue 1 builtin echo a z builtin echo b y continue 1 builtin echo b z proc zero return 0 proc zero |
osh | 18 use builtin and invokable module [osh stderr] Expected "> source for-xtrace.ysh\n . builtin echo '[for-xtrace]'\n > proc increment\n . builtin echo 'counter = 5'\n < proc increment\n< source for-xtrace.ysh\n. builtin echo\n> use for-xtrace.ysh\n . builtin echo '[for-xtrace]'\n > proc increment\n . builtin echo 'counter = 5'\n < proc increment\n< use for-xtrace.ysh\n> module-invoke for-xtrace increment foo bar\n . builtin echo 'counter = 6'\n< module-invoke for-xtrace\n" Got "source for-xtrace.ysh\nbuiltin echo '[for-xtrace]'\nproc increment\nbuiltin echo 'counter = 5'\nproc increment\nsource for-xtrace.ysh\nbuiltin echo\nuse for-xtrace.ysh\nbuiltin echo '[for-xtrace]'\nproc increment\nbuiltin echo 'counter = 5'\nproc increment\nuse for-xtrace.ysh\nmodule-invoke for-xtrace increment foo bar\nbuiltin echo 'counter = 6'\nmodule-invoke for-xtrace\n" stdout: [for-xtrace] counter = 5 [for-xtrace] counter = 5 counter = 6stderr: source for-xtrace.ysh builtin echo '[for-xtrace]' proc increment builtin echo 'counter = 5' proc increment source for-xtrace.ysh builtin echo use for-xtrace.ysh builtin echo '[for-xtrace]' proc increment builtin echo 'counter = 5' proc increment use for-xtrace.ysh module-invoke for-xtrace increment foo bar builtin echo 'counter = 6' module-invoke for-xtrace |
osh_ALT | 18 use builtin and invokable module [osh_ALT stderr] Expected "> source for-xtrace.ysh\n . builtin echo '[for-xtrace]'\n > proc increment\n . builtin echo 'counter = 5'\n < proc increment\n< source for-xtrace.ysh\n. builtin echo\n> use for-xtrace.ysh\n . builtin echo '[for-xtrace]'\n > proc increment\n . builtin echo 'counter = 5'\n < proc increment\n< use for-xtrace.ysh\n> module-invoke for-xtrace increment foo bar\n . builtin echo 'counter = 6'\n< module-invoke for-xtrace\n" Got "source for-xtrace.ysh\nbuiltin echo '[for-xtrace]'\nproc increment\nbuiltin echo 'counter = 5'\nproc increment\nsource for-xtrace.ysh\nbuiltin echo\nuse for-xtrace.ysh\nbuiltin echo '[for-xtrace]'\nproc increment\nbuiltin echo 'counter = 5'\nproc increment\nuse for-xtrace.ysh\nmodule-invoke for-xtrace increment foo bar\nbuiltin echo 'counter = 6'\nmodule-invoke for-xtrace\n" stdout: [for-xtrace] counter = 5 [for-xtrace] counter = 5 counter = 6stderr: source for-xtrace.ysh builtin echo '[for-xtrace]' proc increment builtin echo 'counter = 5' proc increment source for-xtrace.ysh builtin echo use for-xtrace.ysh builtin echo '[for-xtrace]' proc increment builtin echo 'counter = 5' proc increment use for-xtrace.ysh module-invoke for-xtrace increment foo bar builtin echo 'counter = 6' module-invoke for-xtrace |
osh | 19 Encoded argv uses shell encoding, not J8 [osh stderr] Expected ". builtin echo $'one two\\n' '\xce\xbc'\n", got "builtin echo $'one two\\n' '\xce\xbc'\n" stdout: one two μstderr: builtin echo $'one two\n' 'μ' |
osh_ALT | 19 Encoded argv uses shell encoding, not J8 [osh_ALT stderr] Expected ". builtin echo $'one two\\n' '\xce\xbc'\n", got "builtin echo $'one two\\n' '\xce\xbc'\n" stdout: one two μstderr: builtin echo $'one two\n' 'μ' |