Commit 811735b6 authored by Razvan Becheriu's avatar Razvan Becheriu
Browse files

added test for very long text for parser which checks for crash - bug in flex...

added test for very long text for parser which checks for crash - bug in flex generated code using REJECT
parent 57d16694
......@@ -1488,6 +1488,13 @@ TEST_F(EvalContextTest, parseErrors) {
"expecting integer");
checkError("substring('foobar',1,a) == 'foo'",
"<string>:1.22: Invalid character: a");
string long_text = "substring('foobar',1,65535) == ";
for (int i = 0; i < (1 << 16); ++i) {
long_text += "0";
}
long_text += "'";
checkError(long_text,
"<string>:1.65568: Invalid character: '");
checkError("concat('foobar') == 'f'",
"<string>:1.16: syntax error, unexpected ), expecting \",\"");
checkError("concat('foo','bar','') == 'foobar'",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment