Results for parse-errors.test.sh

statusbashdashmkshosh
pass 2223824
ok 33191
N-I 0100
BUG 3110
FAIL 0003
total28282828
casebashdashmkshoshdescription
0pass pass pass pass Long Token - 65535 bytes
1ok ok ok pass Token that's too long for Oils - 65536 bytes
detailsdetailsdetails
2pass pass pass pass $% is not a parse error
3ok pass ok pass Bad braced var sub -- not allowed
detailsdetails
4BUG BUG BUG pass Bad var sub caught at parse time
detailsdetailsdetails
5pass pass ok pass Incomplete while
details
6pass pass ok pass Incomplete for
details
7pass pass ok pass Incomplete if
details
8pass pass ok pass do unexpected
details
9pass pass ok pass } is a parse error
details
10pass pass ok pass { is its own word, needs a space
details
11pass pass pass pass } on the second line
12BUG pass ok pass Invalid for loop variable name
detailsdetails
13pass pass pass pass bad var name globally isn't parsed like an assignment
14pass ok pass pass bad var name in export
details
15pass ok pass pass bad var name in local
details
16pass pass ok pass misplaced parentheses are not a subshell
details
17pass pass ok pass incomplete command sub
details
18pass pass ok pass incomplete backticks
details
19pass pass ok pass misplaced ;;
details
20pass N-I ok pass empty clause in [[
detailsdetails
21ok pass ok pass interactive parse error (regression)
detailsdetails
22BUG pass ok FAIL array literal inside array is a parse error
detailsdetailsdetails
23pass pass ok FAIL array literal inside loop is a parse error
detailsdetails
24pass pass ok FAIL array literal in case
detailsdetails
25pass pass ok pass %foo=() is parse error (regression)
details
26pass pass pass ok leading =word is not allowed regardless of shopt -s parse_equals
details
27pass pass pass pass echo =word is allowed
77 passed, 26 OK, 1 not implemented, 5 BUG, 3 failed, 0 timeouts, 0 cases skipped
3 failed under osh

Details on runs that didn't PASS

bash1 Token that's too long for Oils - 65536 bytes

stdout:
status=0
65536 out
stderr:
dash1 Token that's too long for Oils - 65536 bytes

stdout:
status=0
65536 out
stderr:
mksh1 Token that's too long for Oils - 65536 bytes

stdout:
status=0
65536 out
stderr:
bash3 Bad braced var sub -- not allowed

stdout:
stderr: 
bash: line 1: ${%}: bad substitution
mksh3 Bad braced var sub -- not allowed

stdout:
stderr: 
mksh: <stdin>[1]: ${%}: bad substitution
bash4 Bad var sub caught at parse time

stdout:
ok
stderr:
dash4 Bad var sub caught at parse time

stdout:
ok
stderr:
mksh4 Bad var sub caught at parse time

stdout:
ok
stderr:
mksh5 Incomplete while

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: 'while' unmatched
mksh6 Incomplete for

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: 'newline' unexpected
mksh7 Incomplete if

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: 'if' unmatched
mksh8 do unexpected

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: 'do' unexpected
mksh9 } is a parse error

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '}' unexpected
mksh10 { is its own word, needs a space

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '}' unexpected
bash12 Invalid for loop variable name

stdout:
done
stderr:
bash: line 3: `i.j': not a valid identifier
mksh12 Invalid for loop variable name

stdout:
stderr: 
mksh: <stdin>[1]: for: bad identifier
dash14 bad var name in export

stdout:
stderr: 
dash: 1: export: FOO-BAR: bad variable name
dash15 bad var name in local

stdout:
stderr: 
dash: 2: FOO-BAR: bad variable name
mksh16 misplaced parentheses are not a subshell

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '(' unexpected
mksh17 incomplete command sub

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '(' unmatched
mksh18 incomplete backticks

stdout:
stderr: 
mksh: <stdin>[2]: no closing quote
mksh19 misplaced ;;

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: ';;' unexpected
dash20 empty clause in [[

stdout:
stderr: 
dash: 1: [[: not found
mksh20 empty clause in [[

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '||' expression expected
bash21 interactive parse error (regression)

stdout:
stderr: 
bash: cannot set terminal process group (2401): Inappropriate ioctl for device
bash: no job control in this shell
bash: syntax error near unexpected token `)'
mksh21 interactive parse error (regression)

stdout:
stderr: 
mksh: can't find tty fd: No such device or address
mksh: warning: won't have full job control
mksh: syntax error: ')' unexpected
bash22 array literal inside array is a parse error

stdout:
len=0
stderr:
bash: line 1: syntax error near unexpected token `('
bash: line 1: `a=( inside=() )'
mksh22 array literal inside array is a parse error

stdout:
stderr: 
mksh: <stdin>[1]: syntax error: '(' unexpected
osh22 array literal inside array is a parse error

[osh status] Expected 2, got 1

stdout:
stderr: 
  a=( inside=() )
             ^
[ stdin ]:1: fatal: Unexpected array literal
mksh23 array literal inside loop is a parse error

stdout:
stderr: 
mksh: <stdin>[2]: syntax error: '(' unexpected
osh23 array literal inside loop is a parse error

[osh status] Expected 2, got 1

stdout:
stderr: 
    for x in a=(); do
               ^
[ stdin ]:2: fatal: Unexpected array literal
mksh24 array literal in case

stdout:
stderr: 
mksh: <stdin>[2]: syntax error: '(' unexpected
osh24 array literal in case

[osh status] Expected 2, got 1

stdout:
stderr: 
    case a=() in
           ^
[ stdin ]:2: fatal: Unexpected array literal
mksh25 %foo=() is parse error (regression)

stdout:
stderr: 
mksh: <stdin>[2]: %foo=: invalid function name
osh26 leading =word is not allowed regardless of shopt -s parse_equals

stdout:
stderr: 
  =word
  ^
[ stdin ]:1: =word isn't allowed.  Hint: add a space after =, or quote it