Results for special-vars.test.sh

statusdashbashmkshzshosh
pass 1324161820
ok 00100
N-I 100530
BUG 10230
FAIL 00004
total2424242424
casedashbashmkshzshoshdescription
0pass pass pass pass pass $PWD is set
1pass pass BUG pass pass $PWD is not only set, but exported
details
2pass pass pass BUG pass $HOME is NOT set
details
3pass pass pass BUG pass $1 .. $9 are scoped, while $0 is not
details
4pass pass pass pass pass $?
5pass pass pass pass pass $#
6N-I pass N-I pass FAIL $_
detailsdetailsdetails
7pass pass pass pass pass $$ looks like a PID
8pass pass pass pass pass $$ doesn't change with subshell or command sub
9N-I pass pass N-I FAIL $BASHPID DOES change with subshell and command sub
detailsdetailsdetails
10pass pass pass pass pass Background PID $! looks like a PID
11pass pass pass pass pass $PPID
12N-I pass pass N-I pass $PIPESTATUS
detailsdetails
13N-I pass pass pass FAIL $RANDOM
detailsdetails
14N-I pass N-I pass pass $UID and $EUID
detailsdetails
15N-I pass N-I pass pass $OSTYPE is non-empty
detailsdetails
16N-I pass N-I N-I pass $HOSTNAME
detailsdetailsdetails
17BUG pass pass BUG pass $LINENO is the current line, not line of function call
detailsdetails
18N-I pass N-I pass pass $LINENO for [[
detailsdetails
19N-I pass pass pass pass $LINENO for ((
details
20pass pass ok pass pass $LINENO in for loop
details
21pass pass pass pass pass $LINENO in other for loops
22N-I pass BUG pass FAIL $LINENO in for (( loop
detailsdetailsdetails
23pass pass pass pass pass $LINENO for assignment
91 passed, 1 OK, 18 not implemented, 6 BUG, 4 failed, 0 timeouts, 0 cases skipped
4 failed under osh

Details on runs that didn't PASS

mksh1 $PWD is not only set, but exported

stdout:
stderr: 
zsh2 $HOME is NOT set

stdout:
zsh sets HOME
stderr:
zsh3 $1 .. $9 are scoped, while $0 is not

stdout:
func a b
stderr:
dash6 $_

stdout:
hi

stderr:
mksh6 $_

stdout:
hi

stderr:
osh6 $_

[osh stdout] Expected u'hi\nhi\n', got 'hi\n\n'

stdout:
hi

stderr:
dash9 $BASHPID DOES change with subshell and command sub

stdout:
stderr: 
empty BASHPID in parent
zsh9 $BASHPID DOES change with subshell and command sub

stdout:
stderr: 
empty BASHPID in parent
osh9 $BASHPID DOES change with subshell and command sub

[osh stdout] Expected 'subshell OK\ncommand sub OK\n', got ''
[osh status] Expected 3, got 1

stdout:
stderr: 
empty BASHPID in parent
dash12 $PIPESTATUS

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 2: Bad substitution
zsh12 $PIPESTATUS

stdout:
['']
stderr:
dash13 $RANDOM

stdout:
0
stderr:
osh13 $RANDOM

[osh status] Expected 0, got 1

stdout:
0
stderr:
dash14 $UID and $EUID

stdout:
stderr: 
mksh14 $UID and $EUID

stdout:
stderr: 
dash15 $OSTYPE is non-empty

stdout:
status=1
stderr:
mksh15 $OSTYPE is non-empty

stdout:
status=1
stderr:
dash16 $HOSTNAME

stdout:
status=1
stderr:
mksh16 $HOSTNAME

stdout:
status=1
stderr:
zsh16 $HOSTNAME

stdout:
status=1
stderr:
dash17 $LINENO is the current line, not line of function call

stdout:
1
['2']
['2']
['4']
stderr:
zsh17 $LINENO is the current line, not line of function call

stdout:
1
['1']
['1']
['3']
stderr:
dash18 $LINENO for [[

stdout:
one
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 2: [[: not found
mksh18 $LINENO for [[

stdout:
one
stderr:
dash19 $LINENO for ((

stdout:
one

stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 2: x: not found
mksh20 $LINENO in for loop

stdout:
one
1
zzz
stderr:
dash22 $LINENO in for (( loop

stdout:
one
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 2: Syntax error: Bad for loop variable
mksh22 $LINENO in for (( loop

stdout:
one
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[2]: syntax error: '((' unexpected
osh22 $LINENO in for (( loop

[osh stdout] Expected 'one\n0\n1\n', got 'one\n0\n1\n2\n'

stdout:
one
0
1
2
stderr: