Results for vars-special.test.sh

statusoshosh-cpp
pass 3636
ok 11
FAIL 22
total3939
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
5pass pass $1 .. $9 are scoped, while $0 is not
6pass pass $?
7pass pass $#
8pass pass $$ looks like a PID
9pass pass $$ doesn't change with subshell or command sub
10pass pass $BASHPID DOES change with subshell and command sub
11pass pass Background PID $! looks like a PID
12pass pass $PPID
13pass pass $PIPESTATUS
14FAIL FAIL $RANDOM
detailsdetails
15pass pass $UID and $EUID
16pass pass $OSTYPE is non-empty
17pass pass $HOSTNAME
18pass pass $LINENO is the current line, not line of function call
19pass pass $LINENO in "bare" redirect arg (bug regression)
20pass pass $LINENO in redirect arg (bug regression)
21pass pass $LINENO in [[
22pass pass $LINENO in ((
23pass pass $LINENO in for loop
24pass pass $LINENO in other for loops
25FAIL FAIL $LINENO in for (( loop
detailsdetails
26pass pass $LINENO for assignment
27pass pass $LINENO in case
28pass pass $_ with simple command and evaluation
29pass pass $_ and ${_}
30pass pass $_ with word splitting
31pass pass $_ with pipeline and subshell
32pass pass $_ with && and ||
33pass pass $_ is not reset with (( and [[
34ok ok $_ with assignments, arrays, etc.
detailsdetails
35pass pass $_ with loop
36pass pass $_ is not undefined on first use
37pass pass BASH_VERSION / OILS_VERSION
38pass pass $SECONDS
72 passed, 2 OK, 0 not implemented, 0 BUG, 2 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

osh14 $RANDOM

[osh status] Expected 0, got 1

stdout:
0
stderr:
osh-cpp14 $RANDOM

[osh-cpp status] Expected 0, got 99

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

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

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

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

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