case | dash | bash | mksh | osh | description |
0 | pass | pass | pass | pass | $PWD |
1 | pass | pass | pass | pass | $? |
2 | pass | pass | pass | pass | $# |
3 | ok | ok | ok | FAIL | $- |
details | details | details | details | ||
4 | N-I | pass | N-I | FAIL | $_ |
details | details | details | |||
5 | pass | pass | pass | pass | $$ looks like a PID |
6 | pass | pass | pass | pass | $$ doesn't change with subshell |
7 | N-I | pass | pass | FAIL | $BASHPID DOES change with subshell |
details | details | ||||
8 | pass | pass | pass | pass | Background PID $! looks like a PID |
9 | pass | pass | pass | FAIL | $PPID |
details | |||||
10 | N-I | pass | pass | pass | $PIPESTATUS |
details | |||||
11 | N-I | pass | pass | FAIL | $RANDOM |
details | details |
35 passed, 3 ok, 5 known unimplemented, 0 known bugs, 5 failed, 0 skipped
dash | 3 $- stdout: ustderr: |
bash | 3 $- stdout: huBcstderr: |
mksh | 3 $- stdout: uhcstderr: |
osh | 3 $- [osh status] Expected 0, got 2 stdout: stderr: Usage: osh [options] osh: error: no such option: -o |
dash | 4 $_ stdout: histderr: |
mksh | 4 $_ stdout: histderr: |
osh | 4 $_ [osh stdout] Expected u'hi\nhi\n', got 'hi\n\n' stdout: histderr: |
dash | 7 $BASHPID DOES change with subshell stdout: stderr: empty BASHPID in parent |
osh | 7 $BASHPID DOES change with subshell [osh status] Expected 3, got 1 stdout: stderr: empty BASHPID in parent |
osh | 9 $PPID [osh status] Expected 0, got 1 stdout: stderr: |
dash | 10 $PIPESTATUS stdout: stderr: /bin/dash: 2: Bad substitution |
dash | 11 $RANDOM stdout: 0stderr: |
osh | 11 $RANDOM [osh status] Expected 0, got 99 stdout: 7stderr: |