/external/webkit/Source/JavaScriptCore/tests/mozilla/js1_2/regexp/ |
backslash.js | 33 var TITLE = 'RegExp: \\'; 41 // 'abcde'.match(new RegExp('\e')) 42 testcases[count++] = new TestCase ( SECTION, "'abcde'.match(new RegExp('\e'))", 43 String(["e"]), String('abcde'.match(new RegExp('\e')))); 45 // 'ab\\cde'.match(new RegExp('\\\\')) 46 testcases[count++] = new TestCase ( SECTION, "'ab\\cde'.match(new RegExp('\\\\'))", 47 String(["\\"]), String('ab\\cde'.match(new RegExp('\\\\')))); 53 // 'before ^$*+?.()|{}[] after'.match(new RegExp('\^\$\*\+\?\.\(\)\|\{\}\[\]')) 55 "'before ^$*+?.()|{}[] after'.match(new RegExp('\\^\\$\\*\\+\\?\\.\\(\\)\\|\\{\\}\\[\\]'))", 57 String('before ^$*+?.()|{}[] after'.match(new RegExp('\\^\\$\\*\\+\\?\\.\\(\\)\\|\\{\\}\\[\\]')))) [all...] |
string_search.js | 53 // 'abcdefg123456hijklmn'.search(new RegExp()) 54 testcases[count++] = new TestCase ( SECTION, "'abcdefg123456hijklmn'.search(new RegExp())", 55 0, 'abcdefg123456hijklmn'.search(new RegExp())); 57 // 'abc'.search(new RegExp('$')) 58 testcases[count++] = new TestCase ( SECTION, "'abc'.search(new RegExp('$'))", 59 3, 'abc'.search(new RegExp('$'))); 61 // 'abc'.search(new RegExp('^')) 62 testcases[count++] = new TestCase ( SECTION, "'abc'.search(new RegExp('^'))", 63 0, 'abc'.search(new RegExp('^')));
|
string_split.js | 57 // 'dfe23iu 34 =+65--'.split(new RegExp('\d+')) 58 testcases[count++] = new TestCase ( SECTION, "'dfe23iu 34 =+65--'.split(new RegExp('\\d+'))", 59 String(["dfe","iu "," =+","--"]), String('dfe23iu 34 =+65--'.split(new RegExp('\\d+')))); 69 // 'abc'.split(new RegExp('[a-z]')) 70 testcases[count++] = new TestCase ( SECTION, "'abc'.split(new RegExp('[a-z]'))", 71 String(["","",""]), String('abc'.split(new RegExp('[a-z]')))); 73 // 'abc'.split(new RegExp('[a-z]')) 74 testcases[count++] = new TestCase ( SECTION, "'abc'.split(new RegExp('[a-z]'))", 75 String(["","",""]), String('abc'.split(new RegExp('[a-z]'))));
|
word_boundary.js | 33 var TITLE = 'RegExp: \\b and \\B'; 41 // 'cowboy boyish boy'.match(new RegExp('\bboy\b')) 42 testcases[count++] = new TestCase ( SECTION, "'cowboy boyish boy'.match(new RegExp('\\bboy\\b'))", 43 String(["boy"]), String('cowboy boyish boy'.match(new RegExp('\\bboy\\b')))); 56 "'" + s + "'.match(new RegExp('\\b123[a-z]\\b'))", 57 String(["123c"]), String(s.match(new RegExp('\\b123[a-z]\\b')))); 66 "'" + s + "'.match(new RegExp('\\B123[a-z]\\B'))", 67 String(["123c"]), String(s.match(new RegExp('\\B123[a-z]\\B')))); 80 "'" + s + "'.match(new RegExp('\\Ba\\d+b\\B'))", 81 String(["a1111b"]), String(s.match(new RegExp('\\Ba\\d+b\\B')))) [all...] |
exec.js | 33 var TITLE = 'RegExp: exec'; 49 var re = new RegExp('3.{4}8'); 58 re = new RegExp('3.{4}8');
|
/external/v8/test/mjsunit/regress/ |
regress-219.js | 52 re = RegExp("a",""); 55 re = RegExp("a", "gim"); 74 assertThrows(function(){ return RegExp("a", "ii"); }) 76 assertThrows(function(){ return RegExp("a", "gii"); }) 78 assertThrows(function(){ return RegExp("a", "igi"); }) 80 assertThrows(function(){ return RegExp("a", "iig"); }) 82 assertThrows(function(){ return RegExp("a", "gimi"); }) 84 assertThrows(function(){ return RegExp("a", "giim"); }) 86 assertThrows(function(){ return RegExp("a", "igim"); }) 102 assertThrows(function(){ return RegExp("a", "iii"); } [all...] |
regress-1217.js | 28 // Check that RegExp.prototype is itself a RegExp object. 30 var proto = RegExp.prototype; 31 assertEquals("[object RegExp]", Object.prototype.toString.call(proto)); 49 // We disallow re-compiling the RegExp.prototype object.
|
/external/v8/test/mjsunit/ |
string-match.js | 33 function testMatch(name, input, regexp, result, captures, from, to) { 34 var matchResult = input.match(regexp); 42 if (regexp.global) { 55 assertEquals(match, RegExp["$&"], name + "-$&"); 56 assertEquals(match, RegExp.lastMatch, name + "-lastMatch"); 58 assertEquals(undefined, RegExp.$0, name + "-nocapture-10"); 61 assertEquals(captures[i - 1], RegExp["$" + i], name + "-capture-" + i); 63 assertEquals("", RegExp["$" + i], name + "-nocapture-" + i); 66 assertEquals(undefined, RegExp.$10, name + "-nocapture-10"); 68 assertEquals(input, RegExp.input, name + "-input") [all...] |
regexp-multiline.js | 29 * @fileoverview Check that various regexp constructs work as intended. 83 var a = new RegExp("^" + lc + "$"); 85 a = new RegExp("^" + lc + "$", "i"); 88 var A = new RegExp("^" + uc + "$"); 90 A = new RegExp("^" + uc + "$", "i"); 93 a = new RegExp("^[" + lc + "]$"); 95 a = new RegExp("^[" + lc + "]$", "i"); 98 A = new RegExp("^[" + uc + "]$"); 100 A = new RegExp("^[" + uc + "]$", "i"); 112 assertThrows("a = new RegExp('[z-a]');") [all...] |
cyrillic.js | 60 return new RegExp("[" + from + "-" + to + "]", flags); 143 assertFalse(new RegExp(regex).test(sigma), 31 + name); 144 assertFalse(new RegExp(regex).test(alternative_sigma), 32 + name); 145 assertTrue(new RegExp(regex).test(SIGMA), 33 + name); 147 assertTrue(new RegExp(regex, "i").test(sigma), 34 + name); 149 assertTrue(new RegExp(regex, "i").test(alternative_sigma), 35 + name); 150 assertTrue(new RegExp(regex, "i").test(SIGMA), 36 + name); 154 assertTrue(new RegExp(regex).test(sigma), 41 + name); 155 assertFalse(new RegExp(regex).test(alternative_sigma), 42 + name); 156 assertFalse(new RegExp(regex).test(SIGMA), 43 + name) [all...] |
regexp-string-methods.js | 28 // Regexp shouldn't use String.prototype.slice() 35 // Regexp shouldn't use String.prototype.charAt() 36 var f1 = new RegExp("f", "i"); 41 var f2 = new RegExp("[g]", "i"); 47 // We match other browsers in using the original value of RegExp.prototype.exec. 48 // I.e., RegExp.prototype.test shouldn't use the current value of 49 // RegExp.prototype.exec. 50 RegExp.prototype.exec = function(string) { return 'x'; };
|
regexp-multiline-stack-trace.js | 33 * @fileoverview Check that various regexp constructs work as intended. 87 var a = new RegExp("^" + lc + "$"); 89 a = new RegExp("^" + lc + "$", "i"); 92 var A = new RegExp("^" + uc + "$"); 94 A = new RegExp("^" + uc + "$", "i"); 97 a = new RegExp("^[" + lc + "]$"); 99 a = new RegExp("^[" + lc + "]$", "i"); 102 A = new RegExp("^[" + uc + "]$"); 104 A = new RegExp("^[" + uc + "]$", "i"); 116 assertThrows("a = new RegExp('[z-a]');") [all...] |
/external/v8/src/ |
regexp.js | 31 var $RegExp = global.RegExp; 36 // RegExp : Called as constructor; see ECMA-262, section 15.10.4. 90 // RegExp : Called as function; see ECMA-262, section 15.10.3.1. 94 return new $RegExp(pattern, flags); 98 // Deprecated RegExp.prototype.compile method. We behave like the constructor 99 // were called again. In SpiderMonkey, this method returns the regexp object. 107 // RegExp.prototype.compile and in the constructor, where they are 110 if (this == $RegExp.prototype) { 111 // We don't allow recompiling RegExp.prototype [all...] |
/external/webkit/Source/JavaScriptCore/tests/mozilla/ecma_2/RegExp/ |
properties-002.js | 2 * File Name: RegExp/properties-002.js 10 var SECTION = "RegExp/properties-002.js"; 12 var TITLE = "Properties of RegExp Instances"; 80 AddTestCase( re + ".test == RegExp.prototype.test", 82 re.test == RegExp.prototype.test ); 84 AddTestCase( re + ".toString == RegExp.prototype.toString", 86 re.toString == RegExp.prototype.toString ); 88 AddTestCase( re + ".contructor == RegExp.prototype.constructor", 90 re.constructor == RegExp.prototype.constructor ); 92 AddTestCase( re + ".compile == RegExp.prototype.compile" [all...] |
/external/webkit/Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/ |
15.10.3.1-1.js | 23 * SUMMARY: Passing (RegExp object, flag) to RegExp() function. 26 * 15.10.3 The RegExp Constructor Called as a Function 28 * 15.10.3.1 RegExp(pattern, flags) 30 * If pattern is an object R whose [[Class]] property is "RegExp" 32 * call the RegExp constructor (section 15.10.4.1), passing it the 39 * "pattern" is itself a RegExp object R 43 * provided. We check that RegExp(R) returns R - 47 var summary = 'Passing (RegExp object,flag) to RegExp() function' [all...] |
15.10.3.1-2.js | 23 * SUMMARY: Passing (RegExp object, flag) to RegExp() function. 26 * 15.10.3 The RegExp Constructor Called as a Function 28 * 15.10.3.1 RegExp(pattern, flags) 30 * If pattern is an object R whose [[Class]] property is "RegExp" 32 * call the RegExp constructor (section 15.10.4.1), passing it the 39 * "pattern" is itself a RegExp object R 44 * RegExp(R, undefined); 48 * RegExp(R); 51 * We check that RegExp(R, undefined) returns R [all...] |
15.10.4.1-1.js | 23 *SUMMARY: Passing a RegExp object to a RegExp() constructor. 26 * 15.10.4.1 new RegExp(pattern, flags) 28 * If pattern is an object R whose [[Class]] property is "RegExp" and 31 * whose [[Class]] property is "RegExp" and flags is not undefined, 39 * "pattern" is itself a RegExp object R 42 * We check that a new RegExp object obj2 defined from these parameters 43 * is morally the same as the original RegExp object obj1. Of course, they 46 * In this test, the initial RegExp object obj1 will not include a flag. The flags 51 var summary = 'Passing a RegExp object to a RegExp() constructor' [all...] |
15.10.4.1-2.js | 23 *SUMMARY: Passing a RegExp object to a RegExp() constructor. 26 * 15.10.4.1 new RegExp(pattern, flags) 28 * If pattern is an object R whose [[Class]] property is "RegExp" and 31 * whose [[Class]] property is "RegExp" and flags is not undefined, 39 * "pattern" is itself a RegExp object R 42 * We check that a new RegExp object obj2 defined from these parameters 43 * is morally the same as the original RegExp object obj1. Of course, they 46 * In this test, the initial RegExp object obj1 will not include a flag. This test is 49 * obj2 = new RegExp(obj1, undefined) [all...] |
15.10.4.1-3.js | 23 *SUMMARY: Passing a RegExp object to a RegExp() constructor. 26 * 15.10.4.1 new RegExp(pattern, flags) 28 * If pattern is an object R whose [[Class]] property is "RegExp" and 31 * whose [[Class]] property is "RegExp" and flags is not undefined, 39 * "pattern" is itself a RegExp object R 42 * We check that a new RegExp object obj2 defined from these parameters 43 * is morally the same as the original RegExp object obj1. Of course, they 46 * In this test, the initial RegExp obj1 will include a flag. The flags 51 var summary = 'Passing a RegExp object to a RegExp() constructor' [all...] |
15.10.4.1-4.js | 23 *SUMMARY: Passing a RegExp object to a RegExp() constructor. 26 * 15.10.4.1 new RegExp(pattern, flags) 28 * If pattern is an object R whose [[Class]] property is "RegExp" and 31 * whose [[Class]] property is "RegExp" and flags is not undefined, 39 * "pattern" is itself a RegExp object R 42 * We check that a new RegExp object obj2 defined from these parameters 43 * is morally the same as the original RegExp object obj1. Of course, they 46 * In this test, the initial RegExp object obj1 will include a flag. This test is 49 * obj2 = new RegExp(obj1, undefined) [all...] |
15.10.4.1-5-n.js | 23 *SUMMARY: Passing a RegExp object to a RegExp() constructor. 26 * 15.10.4.1 new RegExp(pattern, flags) 28 * If pattern is an object R whose [[Class]] property is "RegExp" and 31 * whose [[Class]] property is "RegExp" and flags is not undefined, 39 * "pattern" is itself a RegExp object R 47 var summary = 'Negative test: Passing (RegExp object, flag) to RegExp() constructor'; 48 var statprefix = 'Passing RegExp object on pattern '; 92 obj1 = new RegExp(s, f); [all...] |
regress-103087.js | 23 * "The RegExp MarkupSPE in demo crashes Mozilla" 28 * The reported crash was on i=24 below ('MarkupSPE' regexp) 29 * I crashed on that, and also on i=43 ('XML_SPE' regexp) 131 re = new RegExp(rePatterns[i]); 152 lm = RegExp.lastMatch; 153 lc = RegExp.leftContext; 154 rc = RegExp.rightContext;
|
regress-119909.js | 69 * Creates a regexp pattern like (((((((((hello))))))))) 81 var re = new RegExp(pattern);
|
/external/webkit/Source/JavaScriptCore/runtime/ |
RegExpConstructor.h | 25 #include "RegExp.h" 30 class RegExp; 73 void performMatch(RegExp*, const UString&, int startOffset, int& position, int& length, int** ovector = 0); 110 e.g., RegExp.lastMatch and RegExp.leftParen. 112 ALWAYS_INLINE void RegExpConstructor::performMatch(RegExp* r, const UString& s, int startOffset, int& position, int& length, int** ovector)
|
/external/webkit/LayoutTests/fast/js/resources/ |
js-constructors-use-correct-global.js | 4 var constructors = ["Object", "Function", "Array", "Number", "String", "Boolean", "RegExp", "Date", "Error", "RangeError", "ReferenceError", "SyntaxError", "TypeError", "URIError", "Image"];
|