Results for vars-special.test.sh

statusoshosh-cpp
pass 3838
ok 11
FAIL 33
total4242
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 Vars set interactively only: $HISTFILE
5pass pass Some vars are set, even without startup file, or env: PATH, PWD
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 pass $$ doesn't change with subshell or command sub
13pass pass $BASHPID DOES change with subshell and command sub
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 pass $HOSTNAME
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 pass $_ is not undefined on first use
40pass pass BASH_VERSION / OILS_VERSION
41pass pass $SECONDS
76 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

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:
osh17 $RANDOM

[osh status] Expected 0, got 1

stdout:
0
stderr:
osh-cpp17 $RANDOM

[osh-cpp status] Expected 0, got 99

stdout:
31
stderr:
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: