Results for vars-special.test.sh

statusoshosh-cpp
pass 3831
ok 11
FAIL 310
total4242
caseoshosh-cppdescription
0pass pass $PWD is set
1pass pass $PWD is not only set, but exported
2pass FAIL $PATH is set if unset at startup
details
3pass FAIL $HOME is NOT set
details
4pass pass Vars set interactively only: $HISTFILE
5pass FAIL Some vars are set, even without startup file, or env: PATH, PWD
details
6FAIL FAIL UID EUID PPID can't be changed
detailsdetails
7pass pass HOSTNAME OSTYPE can be changed
8pass pass $1 .. $9 are scoped, while $0 is not
9pass pass $?
10pass pass $#
11pass pass $$ looks like a PID
12pass FAIL $$ doesn't change with subshell or command sub
details
13pass FAIL $BASHPID DOES change with subshell and command sub
details
14pass pass Background PID $! looks like a PID
15pass pass $PPID
16pass pass $PIPESTATUS
17FAIL FAIL $RANDOM
detailsdetails
18pass pass $UID and $EUID
19pass pass $OSTYPE is non-empty
20pass FAIL $HOSTNAME
details
21pass pass $LINENO is the current line, not line of function call
22pass pass $LINENO in "bare" redirect arg (bug regression)
23pass pass $LINENO in redirect arg (bug regression)
24pass pass $LINENO in [[
25pass pass $LINENO in ((
26pass pass $LINENO in for loop
27pass pass $LINENO in other for loops
28FAIL FAIL $LINENO in for (( loop
detailsdetails
29pass pass $LINENO for assignment
30pass pass $LINENO in case
31pass pass $_ with simple command and evaluation
32pass pass $_ and ${_}
33pass pass $_ with word splitting
34pass pass $_ with pipeline and subshell
35pass pass $_ with && and ||
36pass pass $_ is not reset with (( and [[
37ok ok $_ with assignments, arrays, etc.
detailsdetails
38pass pass $_ with loop
39pass FAIL $_ is not undefined on first use
details
40pass pass BASH_VERSION / OILS_VERSION
41pass pass $SECONDS
69 passed, 2 OK, 0 not implemented, 0 BUG, 3 failed, 0 timeouts, 0 cases skipped
3 failed under osh

Details on runs that didn't PASS

osh-cpp2 $PATH is set if unset at startup

[osh-cpp stdout] Expected 'yes\nyes\n', got ''
[osh-cpp status] Expected 0, got -6

stdout:
stderr: 
terminate called after throwing an instance of 'IndexError*'
timeout: the monitored command dumped core
osh-cpp3 $HOME is NOT set

[osh-cpp stdout] Expected 'status=0\nstatus=1\nstatus=1\n', got ''
[osh-cpp status] Expected 0, got -6

stdout:
stderr: 
terminate called after throwing an instance of 'IndexError*'
timeout: the monitored command dumped core
osh-cpp5 Some vars are set, even without startup file, or env: PATH, PWD

[osh-cpp stdout] Expected 'path pwd ps4 0\nshellopts 0\nhome ps1 1\nifs 0\n' Got ''
[osh-cpp status] Expected 0, got -6

stdout:
stderr: 
terminate called after throwing an instance of 'IndexError*'
timeout: the monitored command dumped core
osh6 UID EUID PPID can't be changed

[osh stdout] Expected 'status=1\n', got 'uid=xx\neuid=xx\nstatus=0\n'

stdout:
uid=xx
euid=xx
status=0
stderr:
osh-cpp6 UID EUID PPID can't be changed

[osh-cpp stdout] Expected 'status=1\n', got 'uid=xx\neuid=xx\nppid=xx\nstatus=0\n'

stdout:
uid=xx
euid=xx
ppid=xx
status=0
stderr:
osh-cpp12 $$ doesn't change with subshell or command sub

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

stdout:
subshell OK
stderr:
terminate called after throwing an instance of 'IndexError*'
timeout: the monitored command dumped core
osh-cpp13 $BASHPID DOES change with subshell and command sub

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

stdout:
subshell OK
stderr:
terminate called after throwing an instance of 'IndexError*'
timeout: the monitored command dumped core
osh17 $RANDOM

[osh status] Expected 0, got 1

stdout:
0
stderr:
osh-cpp17 $RANDOM

[osh-cpp status] Expected 0, got 99

stdout:
31
stderr:
osh-cpp20 $HOSTNAME

[osh-cpp stdout] Expected 'status=0\n', got ''
[osh-cpp status] Expected 0, got -6

stdout:
stderr: 
terminate called after throwing an instance of 'IndexError*'
timeout: the monitored command dumped core
osh28 $LINENO in for (( loop

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

stdout:
one
0
1
2
stderr:
osh-cpp28 $LINENO in for (( loop

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

stdout:
one
0
1
2
stderr:
osh37 $_ with assignments, arrays, etc.

stdout:
colon [foo]
bare assign [colon [foo]]
declare [bare assign [colon [foo]]]
array [declare [bare assign [colon [foo]]]]
declare array [array [declare [bare assign [colon [foo]]]]]
declare flag [declare array [array [declare [bare assign [colon [foo]]]]]]
stderr:
osh-cpp37 $_ with assignments, arrays, etc.

stdout:
colon [foo]
bare assign [colon [foo]]
declare [bare assign [colon [foo]]]
array [declare [bare assign [colon [foo]]]]
declare array [array [declare [bare assign [colon [foo]]]]]
declare flag [declare array [array [declare [bare assign [colon [foo]]]]]]
stderr:
osh-cpp39 $_ is not undefined on first use

[osh-cpp stdout] Expected 'status=0\n', got ''
[osh-cpp status] Expected 0, got -6

stdout:
stderr: 
terminate called after throwing an instance of 'IndexError*'
timeout: the monitored command dumped core