Lines Matching refs:function
32 function replaceTest(result, subject, pattern, replacement) {
124 replaceTest("0axbxcx", short, "x", function r(m, i, s) {
134 replaceTest("0axbxcx", short, /x/, function r(m, i, s) {
144 replaceTest("0a1b2c3", short, /x/g, function r(m, i, s) {
154 replaceTest("0a1b2cx", short, /(x)(?=(.))/g, function r(m, c1, c2, i, s) {
184 replaceTest("string 42", "string x", /x/g, function() { return 42; });
185 replaceTest("string 42", "string x", /x/, function() { return 42; });
186 replaceTest("string 42", "string x", /[xy]/g, function() { return 42; });
187 replaceTest("string 42", "string x", /[xy]/, function() { return 42; });
188 replaceTest("string true", "string x", /x/g, function() { return true; });
189 replaceTest("string null", "string x", /x/g, function() { return null; });
190 replaceTest("string undefined", "string x", /x/g, function() { return undefined; });
193 "abc", /(.)|(.)/g, function(m, m1, m2, i, s) { return m1+m2; });
197 function replacer(m,i,s) {
201 + m.replace(/./g,function() { return RegExp['$&']; })
217 var replace_obj = { length: 0, toString: function() { return "x"; }};
221 var search_obj = { length: 1, toString: function() { return "b"; }};
222 assertEquals("axc", "abc".replace(search_obj, function() { return "x"; }));
226 toString: function() { side_effect_flag = true; return "x" }
238 function testIndices99(re) {
263 function testIndices59(re) {