blob: f2039a1070e39106258c7809e8f1b750ab50f1bc [file] [log] [blame]
Test for regression against Yarr Interpreter is hanging in some cases of look-ahead regex patterns. It also tests some other related expressions.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS /(?:(?=x))+/.exec("x") is [""]
PASS /(?:a?)*/.exec("a") is ["a"]
PASS /(a|ab)*/.exec("abab") is ["a","a"]
PASS /(ab)+/.exec("abab") is ["abab","ab"]
FAIL /(|ab)*/.exec("ab") should be ab,ab. Was ,.
FAIL /(?:(|ab)*)/.exec("ab") should be ab,ab. Was ,.
FAIL /(?:(|ab)+)/.exec("ab") should be ab,ab. Was ,.
FAIL /(|ab)+/.exec("abab") should be abab,ab. Was ,.
PASS successfullyParsed is true
TEST COMPLETE