/home/uke/oil/bin/osh interactive: spec test case results

Results for interactive.test.sh

statusosh
pass 15
total15
caseoshdescription
0pass 'exit' in oshrc (regression)
1pass fatal errors continue
2pass interactive shell loads rcfile (when combined with -c)
3pass interactive shell loads files in rcdir (when combined with -c)
4pass nonexistent --rcdir is ignored
5pass shell doesn't load rcfile/rcdir if --norc is given
6pass interactive shell runs PROMPT_COMMAND after each command
7pass parse error in PROMPT_COMMAND
8pass runtime error in PROMPT_COMMAND
9pass Error message with bad oshrc file (currently ignored)
10pass PROMPT_COMMAND can see $?, like bash
11pass PROMPT_COMMAND that writes to BASH_REMATCH
12pass NO ASSERTIONS: Are startup files sourced before or after job control?
13pass HISTFILE is written in interactive shell
14pass HISTFILE default value
15 passed, 0 OK, 0 not implemented, 0 BUG, 0 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh0 'exit' in oshrc (regression)

stdout:
one
stderr:
osh1 fatal errors continue

stdout:
one
stderr:
  echo $(( 1 / 0 ))
             ^
[ -c flag ]:2: fatal: Divide by zero
osh2 interactive shell loads rcfile (when combined with -c)

stdout:
1
RCFILE
2
stderr:
osh3 interactive shell loads files in rcdir (when combined with -c)

stdout:
A
rcdir 1
rcdir 2
B
rcfile first
rcdir 1
rcdir 2
C
stderr:
osh4 nonexistent --rcdir is ignored

stdout:
hi
status=0
stderr:
osh5 shell doesn't load rcfile/rcdir if --norc is given

stdout:
A
C
D
stderr:
osh warning: --rcfile ignored in non-interactive shell
osh warning: --rcfile ignored in non-interactive shell
osh warning: --rcdir ignored in non-interactive shell
osh6 interactive shell runs PROMPT_COMMAND after each command

stdout:
PROMPT
one
PROMPT
two
PROMPT
^D
stderr:
osh7 parse error in PROMPT_COMMAND

stdout:
one
two
^D
stderr:
  ;
  ^
[ 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
osh8 runtime error in PROMPT_COMMAND

stdout:
one
two
^D
stderr:
  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
osh9 Error message with bad oshrc file (currently ignored)

stdout:
hi
status=0
bad_oshrc:
stderr:
osh10 PROMPT_COMMAND can see $?, like bash

stdout:
last_status=0
last_status=42
last_status=43
ok
last_status=0
^D
stderr:
osh11 PROMPT_COMMAND that writes to BASH_REMATCH

stdout:
---
one
---
---
bar b a r
---
^D
stderr:
osh12 NO ASSERTIONS: Are startup files sourced before or after job control?

stdout:
myrc: pid = 804
    PID    PPID    PGID     SID   TPGID COMMAND
    804     800     804       1     807 python2
main: pid = 804
    PID    PPID    PGID     SID   TPGID COMMAND
    804     800     804       1     808 python2
stderr:
osh13 HISTFILE is written in interactive shell

stdout:
hist1
hist2
^D
echo hist1; echo hist2
stderr:
osh-0.24.0$ osh-0.24.0$ 
osh14 HISTFILE default value

stdout:
status=0
stderr: