run-file-with-osh () { _run-file-with-one $REPO_ROOT/bin/osh "$@" } /home/uke/oil/bin/osh
spec test index / oilshell.org
15 passed, 0 OK, 0 not implemented, 0 BUG, 0 failed, 0 timeouts, 0 cases skipped
osh | 0 'exit' in oshrc (regression) stdout: onestderr: |
osh | 1 fatal errors continue stdout: onestderr: echo $(( 1 / 0 )) ^ [ -c flag ]:2: fatal: Divide by zero |
osh | 2 interactive shell loads rcfile (when combined with -c) stdout: 1 RCFILE 2stderr: |
osh | 3 interactive shell loads files in rcdir (when combined with -c) stdout: A rcdir 1 rcdir 2 B rcfile first rcdir 1 rcdir 2 Cstderr: |
osh | 4 nonexistent --rcdir is ignored stdout: hi status=0stderr: |
osh | 5 shell doesn't load rcfile/rcdir if --norc is given stdout: A C Dstderr: osh warning: --rcfile ignored with --norc osh warning: --rcfile ignored in non-interactive shell osh warning: --rcfile ignored with --norc osh warning: --rcdir ignored with --norc osh warning: --rcfile ignored in non-interactive shell osh warning: --rcdir ignored in non-interactive shell |
osh | 6 interactive shell runs PROMPT_COMMAND after each command stdout: PROMPT one PROMPT two PROMPT ^Dstderr: |
osh | 7 parse error in PROMPT_COMMAND stdout: one two ^Dstderr: ; ^ [ var 'PROMPT_COMMAND' at ? ]:1: Invalid word while parsing command ; ^ [ var 'PROMPT_COMMAND' at ? ]:1: Invalid word while parsing command ; ^ [ var 'PROMPT_COMMAND' at ? ]:1: Invalid word while parsing command |
osh | 8 runtime error in PROMPT_COMMAND stdout: one two ^Dstderr: echo PROMPT $(( 1 / 0 )) ^ [ var 'PROMPT_COMMAND' at ? ]:1: fatal: Divide by zero echo PROMPT $(( 1 / 0 )) ^ [ var 'PROMPT_COMMAND' at ? ]:1: fatal: Divide by zero echo PROMPT $(( 1 / 0 )) ^ [ var 'PROMPT_COMMAND' at ? ]:1: fatal: Divide by zero |
osh | 9 Error message with bad oshrc file (currently ignored) stdout: hi status=0 bad_oshrc:stderr: |
osh | 10 PROMPT_COMMAND can see $?, like bash stdout: last_status=0 last_status=42 last_status=43 ok last_status=0 ^Dstderr: |
osh | 11 PROMPT_COMMAND that writes to BASH_REMATCH stdout: --- one --- --- bar b a r --- ^Dstderr: |
osh | 12 NO ASSERTIONS: Are startup files sourced before or after job control? stdout: myrc: pid = 792 PID PPID PGID SID TPGID COMMAND 792 788 792 1 795 python2 main: pid = 792 PID PPID PGID SID TPGID COMMAND 792 788 792 1 796 python2stderr: |
osh | 13 HISTFILE is written in interactive shell stdout: hist1 hist2 ^D echo hist1; echo hist2stderr: osh-0.22.0$ osh-0.22.0$ |
osh | 14 HISTFILE default value stdout: status=0stderr: |