Results for here-doc.test.sh

statusbashmkshkshtoyshsushbrushosh
pass 33323222233131
ok 0200001
BUG 1000000
FAIL 002121132
total34343434343434
casebashmkshkshtoyshsushbrushoshdescription
0pass pass pass pass pass pass pass Here string
1pass pass pass pass pass pass pass Here string with $
2pass pass pass pass pass pass pass Here redirect with explicit descriptor
3pass pass pass pass FAIL pass pass Here doc from another input file descriptor
details
4pass pass pass pass FAIL pass pass Multiple here docs with different descriptors
details
5pass pass pass pass FAIL FAIL ok Here doc with bad var delimiter
detailsdetailsdetails
6BUG ok FAIL FAIL pass pass pass Here doc with bad comsub delimiter
detailsdetailsdetailsdetails
7pass pass pass FAIL pass pass pass Here doc and < redirect -- last one wins
details
8pass pass pass FAIL pass pass pass < redirect and here doc -- last one wins
details
9pass pass pass pass pass pass pass Here doc with var sub, command sub, arith sub
10pass pass pass pass pass FAIL pass Here doc in middle. And redirects in the middle.
details
11pass pass pass pass pass pass pass Here doc line continuation
12pass pass pass pass pass pass pass Here doc with quote expansion in terminator
13pass pass pass pass pass pass pass Here doc with multiline double quoted string
14pass pass pass FAIL pass pass pass Two here docs -- first is ignored; second ones wins!
details
15pass ok FAIL pass pass pass pass Here doc with line continuation, then pipe. Syntax error.
detailsdetails
16pass pass pass pass pass pass pass Here doc with pipe on first line
17pass pass pass pass FAIL pass pass Here doc with pipe continued on last line
details
18pass pass pass FAIL pass pass pass Here doc with builtin 'read'
details
19pass pass pass FAIL pass pass pass Compound command here doc
details
20pass pass pass pass FAIL pass pass Here doc in while condition and here doc in body
details
21pass pass pass pass pass pass pass Here doc in while condition and here doc in body on multiple lines
22pass pass pass pass pass pass pass Here doc in while loop split up more
23pass pass pass FAIL pass pass pass Mixing << and <<-
details
24pass pass pass FAIL pass pass pass Two compound commands with two here docs
details
25pass pass pass pass FAIL pass pass Function def and execution with here doc
details
26pass pass pass pass pass pass pass Here doc as command prefix
27pass pass pass pass pass FAIL pass Redirect after here doc
details
28pass pass pass FAIL FAIL pass pass here doc stripping tabs
detailsdetails
29pass pass pass pass pass pass pass Here doc within subshell with boolean
30pass pass pass pass FAIL pass pass Here Doc in if condition
details
31pass pass pass FAIL FAIL pass pass Nested here docs which are indented
detailsdetails
32pass pass pass FAIL FAIL pass FAIL Multiple here docs in pipeline
detailsdetailsdetails
33pass pass pass FAIL FAIL pass FAIL Multiple here docs in pipeline on multiple lines
detailsdetailsdetails
204 passed, 3 OK, 0 not implemented, 1 BUG, 30 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

sush3 Here doc from another input file descriptor

[sush stdout] Expected '8: here doc on descriptor\n', got ''
[sush status] Expected 0, got 1

stdout:
stderr: 
FATAL: Error reading from fd 8: [Errno 9] Bad file descriptor
sush4 Multiple here docs with different descriptors

[sush stdout] Expected '0: fd0\n3: fd3\n', got '0: fd3\n'
[sush status] Expected 0, got 1

stdout:
0: fd3
stderr:
FATAL: Error reading from fd 3: [Errno 9] Bad file descriptor
sush5 Here doc with bad var delimiter

[sush stdout] Expected 'here\n', got ''
[sush status] Expected 0, got 2

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line : syntax error: unexpected end of file
brush5 Here doc with bad var delimiter

[brush stdout] Expected 'here\n', got ''
[brush status] Expected 0, got 2

stdout:
stderr: 
ERROR main: unterminated here document sequence; tag(s) [a] found at: [line 1 col 10] (detected near line 4 column 1)
osh5 Here doc with bad var delimiter

stdout:
stderr: 
  cat <<${a}
        ^~
[ stdin ]:1: Invalid here doc delimiter
bash6 Here doc with bad comsub delimiter

stdout:
here
stderr:
mksh6 Here doc with bad comsub delimiter

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '(' unexpected
ksh6 Here doc with bad comsub delimiter

[ksh status] Expected 2, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: syntax error: unexpected '('
toysh6 Here doc with bad comsub delimiter

[toysh stdout] Expected u'', got 'here\n'
[toysh status] Expected 2, got 0

stdout:
here
stderr:
toysh7 Here doc and < redirect -- last one wins

[toysh status] Expected 0, got 127

stdout:
hello
stderr:
sh: here: No such file or directory
toysh8 < redirect and here doc -- last one wins

[toysh status] Expected 0, got 127

stdout:
here
stderr:
sh: hello: No such file or directory
brush10 Here doc in middle. And redirects in the middle.

[brush stderr] Expected 'foo\nhere\nbar\n', got ''

stdout:
foo
here
bar
stderr:
toysh14 Two here docs -- first is ignored; second ones wins!

[toysh status] Expected 0, got 127

stdout:
there
stderr:
sh: hello: No such file or directory
mksh15 Here doc with line continuation, then pipe. Syntax error.

stdout:
stderr: 
mksh: <stdin>[5]: cat: 1: No such file or directory
mksh: <stdin>[6]: syntax error: '|' unexpected
ksh15 Here doc with line continuation, then pipe. Syntax error.

[ksh status] Expected 2, got 1

stdout:
stderr: 
cat: 1: No such file or directory
E: ksh: <stdin>[6]: syntax error: unexpected '|'
sush17 Here doc with pipe continued on last line

[sush stdout] Expected '3\n2\n1\n', got ''

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: 1: command not found
toysh18 Here doc with builtin 'read'

[toysh stdout] Expected '=val1= =val2=\n', got '== ==\n'

stdout:
== ==
stderr:
sh: read: No such file or directory
toysh19 Compound command here doc

[toysh stdout] Expected 'X 1\nX 2\nX 3\n', got ''
[toysh status] Expected 0, got 127

stdout:
stderr: 
sh: read: No such file or directory
sh: 1: No such file or directory
sh: 2: No such file or directory
sh: 3: No such file or directory
sush20 Here doc in while condition and here doc in body

[sush stdout] Expected '1\n2\n3\n', got ''
[sush status] Expected 0, got 127

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: Unexpected token: 

/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: 3: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 7: E3: command not found
toysh23 Mixing << and <<-

[toysh stdout] Expected 'one\n--\ntwo\n', got 'one\n\ntwo\n'

stdout:
one

two
stderr:
toysh24 Two compound commands with two here docs

[toysh stdout] Expected 'X 1\nX 2\n==\nY 3\nY 4\n', got '==\n'
[toysh status] Expected 0, got 127

stdout:
==
stderr:
sh: read: No such file or directory
sh: read: No such file or directory
sh: 3: No such file or directory
sh: 4: No such file or directory
sush25 Function def and execution with here doc

[sush stdout] Expected 'before\n1\n2\nafter\n', got 'before\nafter\n'
[sush status] Expected 0, got 127

stdout:
before
after
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: 1: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: 2: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: EOF: command not found
brush27 Redirect after here doc

[brush stderr] Expected 'out\n', got ''

stdout:
out
stderr:
toysh28 here doc stripping tabs

[toysh stdout] Expected '1\n2\n3 # 2 tabs are both stripped\n 4 # spaces are preserved\n' Got ''
[toysh status] Expected 0, got 1

stdout:
stderr: 
main: line 1: sh: <<EOF EOF
cat: -: Bad file descriptor
cat: closing standard input: Bad file descriptor
sush28 here doc stripping tabs

[sush stdout] Expected '1\n2\n3 # 2 tabs are both stripped\n 4 # spaces are preserved\n' Got '1\n2\n\t3 # 2 tabs are both stripped\n 4 # spaces are preserved\n'

stdout:
1
2
	3  # 2 tabs are both stripped
  4  # spaces are preserved
stderr:
sush30 Here Doc in if condition

[sush stdout] Expected 'here doc in IF CONDITION\nTHEN executed\n', got 'THEN executed\n'
[sush status] Expected 0, got 2

stdout:
THEN executed
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: Unexpected token: 

/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: Unexpected token: fi

toysh31 Nested here docs which are indented

[toysh stdout] Expected 'outside\ninside\n', got 'outside\ninside\nINSIDE\n)\n'

stdout:
outside
inside
INSIDE
)
stderr:
main: line 1: sh: <<INSIDE EOF
sush31 Nested here docs which are indented

[sush stdout] Expected 'outside\ninside\n', got 'outside\n\tinside\n'

stdout:
outside
	inside
stderr:
toysh32 Multiple here docs in pipeline

[toysh stdout] Expected '0: 3: fd3\n5: fd5\nok\n', got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush32 Multiple here docs in pipeline

[sush stdout] Expected '0: 3: fd3\n5: fd5\nok\n', got '0: fd5\nok\n'

stdout:
0: fd5
ok
stderr:
FATAL: Error reading from fd 3: [Errno 9] Bad file descriptor
FATAL: Error reading from fd 5: [Errno 9] Bad file descriptor
osh32 Multiple here docs in pipeline

[osh stdout] Expected '0: 3: fd3\n5: fd5\nok\n', got ''

stdout:
stderr: 
toysh33 Multiple here docs in pipeline on multiple lines

[toysh stdout] Expected '0: 3: fd3\n5: fd5\nok\n', got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush33 Multiple here docs in pipeline on multiple lines

[sush stdout] Expected '0: 3: fd3\n5: fd5\nok\n', got '0: fd5\nok\n'

stdout:
0: fd5
ok
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: fd3: command not found
FATAL: Error reading from fd 3: [Errno 9] Bad file descriptor
FATAL: Error reading from fd 5: [Errno 9] Bad file descriptor
osh33 Multiple here docs in pipeline on multiple lines

[osh stdout] Expected '0: 3: fd3\n5: fd5\nok\n', got ''

stdout:
stderr: