Add test cases for parsing 'begin' without ';'

This commit is contained in:
Sanne Wouda 2015-03-12 11:54:47 +01:00 committed by David Adam
parent fd731fb74f
commit 9e8e5af064

View File

@ -3209,7 +3209,11 @@ static void test_new_parser_correctness(void)
{L"if end", false}, {L"if end", false},
{L"end", false}, {L"end", false},
{L"for i i", false}, {L"for i i", false},
{L"for i in a b c ; end", true} {L"for i in a b c ; end", true},
{L"begin end", true},
{L"begin; end", true},
{L"begin if true; end; end;", true},
{L"begin if true ; echo hi ; end; end", true},
}; };
for (size_t i=0; i < sizeof parser_tests / sizeof *parser_tests; i++) for (size_t i=0; i < sizeof parser_tests / sizeof *parser_tests; i++)