Skip to content

Commit 7ac490f

Browse files
committed
syntax: test that a[b]=c parses as a lit in posix
1 parent 456f78c commit 7ac490f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

syntax/filetests_test.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3145,12 +3145,11 @@ var fileTests = []testCase{
31453145
}}},
31463146
},
31473147
{
3148-
Strs: []string{"a[2]=(b)"},
3148+
Strs: []string{"a[2]=b"},
3149+
posix: litStmt("a[2]=b"),
31493150
bash: &Stmt{Assigns: []*Assign{{
3150-
Name: lit("a[2]"),
3151-
Value: word(
3152-
&ArrayExpr{List: litWords("b")},
3153-
),
3151+
Name: lit("a[2]"),
3152+
Value: litWord("b"),
31543153
}}},
31553154
},
31563155
{

0 commit comments

Comments
 (0)