Results for parse-errors.test.sh

statusdashbashmkshoshosh_ALT
pass 222172222
ok 221811
N-I 10000
BUG 13100
FAIL 00033
total2626262626
casedashbashmkshoshosh_ALTdescription
0pass pass pass pass pass Bad var sub
1pass ok ok pass pass Bad braced var sub -- not allowed
detailsdetails
2BUG BUG BUG pass pass Bad var sub caught at parse time
detailsdetailsdetails
3pass pass ok pass pass Incomplete while
details
4pass pass ok pass pass Incomplete for
details
5pass pass ok pass pass Incomplete if
details
6pass pass ok pass pass do unexpected
details
7pass pass ok pass pass } is a parse error
details
8pass pass ok pass pass { is its own word, needs a space
details
9pass pass pass pass pass } on the second line
10pass BUG ok pass pass Invalid for loop variable name
detailsdetails
11pass pass pass pass pass bad var name globally isn't parsed like an assignment
12ok pass pass pass pass bad var name in export
details
13ok pass pass pass pass bad var name in local
details
14pass pass ok pass pass misplaced parentheses are not a subshell
details
15pass pass ok pass pass incomplete command sub
details
16pass pass ok pass pass incomplete backticks
details
17pass pass ok pass pass misplaced ;;
details
18N-I pass ok pass pass empty clause in [[
detailsdetails
19pass ok ok pass pass interactive parse error (regression)
detailsdetails
20pass BUG ok FAIL FAIL array literal inside array is a parse error
detailsdetailsdetailsdetails
21pass pass ok FAIL FAIL array literal inside loop is a parse error
detailsdetailsdetails
22pass pass ok FAIL FAIL array literal in case
detailsdetailsdetails
23pass pass ok pass pass %foo=() is parse error (regression)
details
24pass pass pass ok ok leading =word is not allowed regardless of shopt -s parse_equals
detailsdetails
25pass pass pass pass pass echo =word is allowed
94 passed, 24 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 Bad braced var sub -- not allowed

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

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

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

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

stdout:
ok
stderr:
mksh3 Incomplete while

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

stdout:
stderr: 
bash: syntax error near unexpected token `)'
mksh19 interactive parse error (regression)

stdout:
stderr: 
mksh: syntax error: ')' unexpected
bash20 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=() )'
mksh20 array literal inside array is a parse error

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

[osh status] Expected 2, got 1

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

[osh_ALT status] Expected 2, got 1

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

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

[osh status] Expected 2, got 0

stdout:
stderr: 
osh_ALT21 array literal inside loop is a parse error

[osh_ALT status] Expected 2, got 0

stdout:
stderr: 
mksh22 array literal in case

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

[osh status] Expected 2, got 0

stdout:
stderr: 
osh_ALT22 array literal in case

[osh_ALT status] Expected 2, got 0

stdout:
stderr: 
mksh23 %foo=() is parse error (regression)

stdout:
stderr: 
mksh: <stdin>[2]: %foo=: invalid function name
osh24 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
osh_ALT24 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