Results for strict-options.test.sh

casedashbashmkshoshosh_ALTdescription
0N-I N-I N-I pass pass strict-arith option
detailsdetailsdetails
1pass pass pass pass pass Sourcing a script that returns at the top level
2pass ok pass pass pass top level control flow
details
3pass ok pass pass pass errexit and top-level control flow
details
4N-I N-I N-I pass pass shopt -s strict-control-flow
detailsdetailsdetails
5pass ok pass pass pass return at top level is an error
details
6pass pass pass pass pass continue at top level is NOT an error
7pass pass pass pass pass break at top level is NOT an error
8pass pass pass pass pass empty argv WITHOUT strict-argv
9pass pass pass FAIL FAIL strict-argv: no first word but exit code (DUPE of if `false` ??)
detailsdetails
10N-I N-I N-I pass pass empty argv WITH strict-argv
detailsdetailsdetails
11N-I BUG BUG FAIL FAIL Arrays should not be incorrectly compared like bash/mksh
detailsdetailsdetailsdetailsdetails
12N-I pass pass pass pass automatically creating arrays WITHOUT strict-array
details
13N-I pass pass pass pass automatically creating arrays are INDEXED, not associative
details

49 passed, 3 ok, 12 known unimplemented, 2 known bugs, 2 failed, 0 skipped

Details on runs that didn't PASS

dash0 strict-arith option

stdout:
stderr: 
_tmp/spec-bin/dash: 1: shopt: not found
bash0 strict-arith option

stdout:
stderr: 
_tmp/spec-bin/bash: line 1: shopt: strict-arith: invalid shell option name
mksh0 strict-arith option

stdout:
stderr: 
_tmp/spec-bin/mksh: <stdin>[1]: shopt: not found
bash2 top level control flow

stdout:
SUBSHELL
BREAK
CONTINUE
RETURN
DONE
stderr:
spec/testdata/top-level-control-flow.sh: line 14: return: can only `return' from a function or sourced script
spec/testdata/top-level-control-flow.sh: line 17: break: only meaningful in a `for', `while', or `until' loop
spec/testdata/top-level-control-flow.sh: line 19: continue: only meaningful in a `for', `while', or `until' loop
spec/testdata/top-level-control-flow.sh: line 24: return: can only `return' from a function or sourced script
bash3 errexit and top-level control flow

stdout:
SUBSHELL
stderr:
spec/testdata/top-level-control-flow.sh: line 14: return: can only `return' from a function or sourced script
dash4 shopt -s strict-control-flow

stdout:
break
hi
stderr:
_tmp/spec-bin/dash: 1: shopt: not found
bash4 shopt -s strict-control-flow

stdout:
break
hi
stderr:
_tmp/spec-bin/bash: line 1: shopt: strict-control-flow: invalid shell option name
_tmp/spec-bin/bash: line 3: break: only meaningful in a `for', `while', or `until' loop
mksh4 shopt -s strict-control-flow

stdout:
break
hi
stderr:
_tmp/spec-bin/mksh: <stdin>[1]: shopt: not found
_tmp/spec-bin/mksh: <stdin>[3]: break: can't break
bash5 return at top level is an error

stdout:
status=1
stderr:
_tmp/spec-bin/bash: line 1: return: can only `return' from a function or sourced script
osh9 strict-argv: no first word but exit code (DUPE of if `false` ??)

[osh stdout] Expected 'FALSE\n', got 'TRUE\n'

stdout:
TRUE
stderr:
osh_ALT9 strict-argv: no first word but exit code (DUPE of if `false` ??)

[osh_ALT stdout] Expected 'FALSE\n', got 'TRUE\n'

stdout:
TRUE
stderr:
dash10 empty argv WITH strict-argv

stdout:
empty
status=0
stderr:
_tmp/spec-bin/dash: 1: shopt: not found
bash10 empty argv WITH strict-argv

stdout:
empty
status=0
stderr:
_tmp/spec-bin/bash: line 1: shopt: strict-argv: invalid shell option name
mksh10 empty argv WITH strict-argv

stdout:
empty
status=0
stderr:
_tmp/spec-bin/mksh: <stdin>[1]: shopt: not found
dash11 Arrays should not be incorrectly compared like bash/mksh

stdout:
stderr: 
_tmp/spec-bin/dash: 1: Syntax error: "(" unexpected
bash11 Arrays should not be incorrectly compared like bash/mksh

stdout:
2
4
EQUAL
stderr:
mksh11 Arrays should not be incorrectly compared like bash/mksh

stdout:
2
4
EQUAL
stderr:
osh11 Arrays should not be incorrectly compared like bash/mksh

[osh stdout] Expected '2\n4\n', got '2\n4\nEQUAL\n'
[osh status] Expected 1, got 0

stdout:
2
4
EQUAL
stderr:
osh_ALT11 Arrays should not be incorrectly compared like bash/mksh

[osh_ALT stdout] Expected '2\n4\n', got '2\n4\nEQUAL\n'
[osh_ALT status] Expected 1, got 0

stdout:
2
4
EQUAL
stderr:
dash12 automatically creating arrays WITHOUT strict-array

stdout:
stderr: 
_tmp/spec-bin/dash: 1: undef[2]=x: not found
_tmp/spec-bin/dash: 2: undef[3]=y: not found
_tmp/spec-bin/dash: 3: Bad substitution
dash13 automatically creating arrays are INDEXED, not associative

stdout:
stderr: 
_tmp/spec-bin/dash: 1: shopt: not found
_tmp/spec-bin/dash: 2: undef[2]=x: not found
_tmp/spec-bin/dash: 3: undef[3]=y: not found
_tmp/spec-bin/dash: 5: undef[bad]=zzz: not found
_tmp/spec-bin/dash: 6: Bad substitution