parse: Test against bogus command leader.

This commit is contained in:
Qi Xiao 2016-02-17 01:15:13 +01:00
parent 8affd31812
commit 7f58514b37

View File

@ -348,8 +348,10 @@ var badCases = []struct {
{")", 0}, {"]", 0}, {"}", 0},
// Unclosed parens.
{"a (", 3}, {"a [", 3}, {"a {", 3},
// Ampersand
// Bogus ampersand.
{"a &", 3}, {"a [&", 4},
// Bogus command leader.
{"else echo 233", 0},
}
func TestParseError(t *testing.T) {