Results for vars-special.test.sh

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

osh5 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-cpp5 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:
osh16 $RANDOM

[osh status] Expected 0, got 1

stdout:
0
stderr:
osh-cpp16 $RANDOM

[osh-cpp status] Expected 0, got 99

stdout:
31
stderr:
osh27 $LINENO in for (( loop

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

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

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

stdout:
one
0
1
2
stderr:
osh36 $_ 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-cpp36 $_ 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: