Lines Matching full:regexp
24 testRegexpHelper(new RegExp("(\\u0066|\\u0062)oo"));
25 testRegexpHelper(new RegExp("(\\u0066|\\u0062)oo", "u"));
26 testRegexpHelper(new RegExp("(\\u{0066}|\\u{0062})oo", "u"));
27 testRegexpHelper(new RegExp("(\\u{66}|\\u{000062})oo", "u"));
30 testRegexpHelper(new RegExp("(\u0066|\u0062)oo"));
31 testRegexpHelper(new RegExp("(\u0066|\u0062)oo", "u"));
32 testRegexpHelper(new RegExp("(\u{0066}|\u{0062})oo", "u"));
33 testRegexpHelper(new RegExp("(\u{66}|\u{000062})oo", "u"));
45 testRegexpHelper(new RegExp("[\\u0062-\\u0066]oo"));
46 testRegexpHelper(new RegExp("[\\u0062-\\u0066]oo", "u"));
47 testRegexpHelper(new RegExp("[\\u{0062}-\\u{0066}]oo", "u"));
48 testRegexpHelper(new RegExp("[\\u{62}-\\u{00000066}]oo", "u"));
51 testRegexpHelper(new RegExp("[\u0062-\u0066]oo"));
52 testRegexpHelper(new RegExp("[\u0062-\u0066]oo", "u"));
53 testRegexpHelper(new RegExp("[\u{0062}-\u{0066}]oo", "u"));
54 testRegexpHelper(new RegExp("[\u{62}-\u{00000066}]oo", "u"));
68 helper1(new RegExp("f\\u{2}bar"));
78 helper2(new RegExp("f\\u{1,2}bar"));
90 helper3(new RegExp("[\\u{2}]"));
101 helper1(new RegExp("first\\u\\x\\z\\8\\9second"));
113 helper2(new RegExp("[\\u\\x\\z\\8\\9]"));
125 assertThrows("new RegExp('\\\\u', 'u')", SyntaxError);
126 assertThrows("new RegExp('\\\\u12', 'u')", SyntaxError);
127 assertThrows("new RegExp('\\\\ufoo', 'u')", SyntaxError);
128 assertThrows("new RegExp('\\\\x', 'u')", SyntaxError);
129 assertThrows("new RegExp('\\\\xfoo', 'u')", SyntaxError);
130 assertThrows("new RegExp('\\\\z', 'u')", SyntaxError);
131 assertThrows("new RegExp('\\\\8', 'u')", SyntaxError);
132 assertThrows("new RegExp('\\\\9', 'u')", SyntaxError);
139 new RegExp("\\u{10ffff}", "u")
141 assertThrows("new RegExp('\\\\u{110000}', 'u')", SyntaxError);
145 new RegExp("\\u{110000}")
156 helper(new RegExp("foo\\[bar"));
158 helper(new RegExp("foo\\[bar", "u"));
168 helper(new RegExp("foo\\ud803\\ude6dbar", "u"));
173 // Test that we can pass all possible regexp flags and they work properly.
183 helper1(new RegExp("foo", "gimyu"));
194 helper2(new RegExp("foo"));
201 assertThrows("new RegExp('foo', 'ugu')");
211 helper(new RegExp("foo", "u"));
216 assertTrue(new RegExp("\u{12345}", "u").test("\u{12345}"));
218 assertTrue(new RegExp("\u{12345}", "u").test("\ud808\udf45"));
220 assertFalse(new RegExp("\u{12345}", "u").test("\udf45"));
224 assertTrue(new RegExp("\u{12345}\u{23456}", "u").test("a\u{12345}\u{23456}b"));
226 assertFalse(new RegExp("\u{12345}\u{23456}", "u").test("a\udf45\u{23456}b"));
230 assertTrue(new RegExp("\u{12345}(?:\u{23456})", "u").test(
233 assertFalse(new RegExp("\u{12345}(?:\u{23456})", "u").test(
238 assertTrue(new RegExp("\u{12345}|\u{23456}", "u").test("a\u{12345}b"));
240 assertFalse(new RegExp("\u{12345}|\u{23456}", "u").test("a\udf45\ud84db"));
244 assertTrue(new RegExp("(\u{12345}|\u{23456}).\\1", "u").test(
247 assertFalse(new RegExp("(\u{12345}|\u{23456}).\\1", "u").test(
252 assertTrue(new RegExp("\u{12345}{3}", "u").test("\u{12345}\u{12345}\u{12345}"));
254 assertTrue(new RegExp("\u{12345}{3}").test("\u{12345}\udf45\udf45"));
256 assertFalse(new RegExp("\u{12345}{3}", "u").test("\u{12345}\udf45\udf45"));