Results for here-doc.test.sh

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

Details on runs that didn't PASS

dash0 Here string

stdout:
stderr: 
dash: 1: Syntax error: redirection unexpected
ash0 Here string

[ash stdout] Expected 'hi\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected redirection
dash1 Here string with $

stdout:
stderr: 
dash: 1: Syntax error: redirection unexpected
ash1 Here string with $

[ash stdout] Expected 'one\ntwo\n\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: syntax error: unexpected redirection
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:
zsh6 Here doc with bad comsub delimiter

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

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:
zsh7 Here doc and < redirect -- last one wins

[zsh stdout] Expected 'hello\n', got 'here\nhello\n'

stdout:
here
hello
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
zsh8 < redirect and here doc -- last one wins

[zsh stdout] Expected 'here\n', got 'hello\nhere\n'

stdout:
hello
here
stderr:
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:
zsh14 Two here docs -- first is ignored; second ones wins!

[zsh stdout] Expected 'there\n', got 'hello\nthere\n'

stdout:
hello
there
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
zsh15 Here doc with line continuation, then pipe. Syntax error.

[zsh status] Expected 2, got 1

stdout:
stderr: 
cat: 1: No such file or directory
zsh: parse error near `|'
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
zsh18 Here doc with builtin 'read'

[zsh stdout] Expected '=val1= =val2=\n', got ''
[zsh status] Expected 0, got 1

stdout:
stderr: 
zsh: val1= 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:
zsh24 Two compound commands with two here docs

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

stdout:
X 1
X 2
stderr:
zsh: = not found
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:
dash29 Here doc within subshell with boolean

stdout:
127
stderr:
dash: 1: [[: not found
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:
FATAL: Error reading from fd 3: [Errno 9] Bad file descriptor
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: fd3: command not found
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: