/external/webkit/Source/JavaScriptCore/tests/mozilla/js1_2/regexp/ |
vertical_bar.js | 33 var TITLE = 'RegExp: |'; 41 // 'abc'.match(new RegExp('xyz|abc')) 42 testcases[count++] = new TestCase ( SECTION, "'abc'.match(new RegExp('xyz|abc'))", 43 String(["abc"]), String('abc'.match(new RegExp('xyz|abc')))); 45 // 'this is a test'.match(new RegExp('quiz|exam|test|homework')) 46 testcases[count++] = new TestCase ( SECTION, "'this is a test'.match(new RegExp('quiz|exam|test|homework'))", 47 String(["test"]), String('this is a test'.match(new RegExp('quiz|exam|test|homework')))); 49 // 'abc'.match(new RegExp('xyz|...')) 50 testcases[count++] = new TestCase ( SECTION, "'abc'.match(new RegExp('xyz|...'))", 51 String(["abc"]), String('abc'.match(new RegExp('xyz|...')))) [all...] |
beginLine.js | 33 var TITLE = 'RegExp: ^'; 41 // 'abcde'.match(new RegExp('^ab')) 42 testcases[count++] = new TestCase ( SECTION, "'abcde'.match(new RegExp('^ab'))", 43 String(["ab"]), String('abcde'.match(new RegExp('^ab')))); 45 // 'ab\ncde'.match(new RegExp('^..^e')) 46 testcases[count++] = new TestCase ( SECTION, "'ab\ncde'.match(new RegExp('^..^e'))", 47 null, 'ab\ncde'.match(new RegExp('^..^e'))); 49 // 'yyyyy'.match(new RegExp('^xxx')) 50 testcases[count++] = new TestCase ( SECTION, "'yyyyy'.match(new RegExp('^xxx'))", 51 null, 'yyyyy'.match(new RegExp('^xxx'))) [all...] |
endLine.js | 33 var TITLE = 'RegExp: $'; 41 // 'abcde'.match(new RegExp('de$')) 42 testcases[count++] = new TestCase ( SECTION, "'abcde'.match(new RegExp('de$'))", 43 String(["de"]), String('abcde'.match(new RegExp('de$')))); 45 // 'ab\ncde'.match(new RegExp('..$e$')) 46 testcases[count++] = new TestCase ( SECTION, "'ab\ncde'.match(new RegExp('..$e$'))", 47 null, 'ab\ncde'.match(new RegExp('..$e$'))); 49 // 'yyyyy'.match(new RegExp('xxx$')) 50 testcases[count++] = new TestCase ( SECTION, "'yyyyy'.match(new RegExp('xxx$'))", 51 null, 'yyyyy'.match(new RegExp('xxx$'))) [all...] |
plus.js | 33 var TITLE = 'RegExp: +'; 41 // 'abcdddddefg'.match(new RegExp('d+')) 42 testcases[count++] = new TestCase ( SECTION, "'abcdddddefg'.match(new RegExp('d+'))", 43 String(["ddddd"]), String('abcdddddefg'.match(new RegExp('d+')))); 45 // 'abcdefg'.match(new RegExp('o+')) 46 testcases[count++] = new TestCase ( SECTION, "'abcdefg'.match(new RegExp('o+'))", 47 null, 'abcdefg'.match(new RegExp('o+'))); 49 // 'abcdefg'.match(new RegExp('d+')) 50 testcases[count++] = new TestCase ( SECTION, "'abcdefg'.match(new RegExp('d+'))", 51 String(['d']), String('abcdefg'.match(new RegExp('d+')))) [all...] |
RegExp_multiline.js | 33 var TITLE = 'RegExp: multiline'; 41 // First we do a series of tests with RegExp.multiline set to false (default value) 42 // Following this we do the same tests with RegExp.multiline set true(**). 43 // RegExp.multiline 44 testcases[count++] = new TestCase ( SECTION, "RegExp.multiline", 45 false, RegExp.multiline); 71 // (multiline == false) 'a11\na22\na23\na24'.match(new RegExp('a..$','g')) 72 testcases[count++] = new TestCase ( SECTION, "(multiline == false) 'a11\\na22\\na23\\na24'.match(new RegExp('a..$','g'))", 73 String(['a24']), String('a11\na22\na23\na24'.match(new RegExp('a..$','g')))); 75 // (multiline == false) 'abc\ndef'.match(new RegExp('c$...$') [all...] |
RegExp_multiline_as_array.js | 33 var TITLE = 'RegExp: $*'; 41 // First we do a series of tests with RegExp['$*'] set to false (default value) 42 // Following this we do the same tests with RegExp['$*'] set true(**). 43 // RegExp['$*'] 44 testcases[count++] = new TestCase ( SECTION, "RegExp['$*']", 45 false, RegExp['$*']); 71 // (['$*'] == false) 'a11\na22\na23\na24'.match(new RegExp('a..$','g')) 72 testcases[count++] = new TestCase ( SECTION, "(['$*'] == false) 'a11\\na22\\na23\\na24'.match(new RegExp('a..$','g'))", 73 String(['a24']), String('a11\na22\na23\na24'.match(new RegExp('a..$','g')))); 75 // (['$*'] == false) 'abc\ndef'.match(new RegExp('c$...$') [all...] |
hexadecimal.js | 33 var TITLE = 'RegExp: \x# (hex) '; 47 "'" + testString + "'.match(new RegExp('" + testPattern + "'))", 48 String(["ABCDEFGHIJKLMNOPQRSTUVWXYZ"]), String(testString.match(new RegExp(testPattern)))); 55 "'" + testString + "'.match(new RegExp('" + testPattern + "'))", 56 String(["abcdefghijklmnopqrstuvwxyz"]), String(testString.match(new RegExp(testPattern)))); 63 "'" + testString + "'.match(new RegExp('" + testPattern + "'))", 64 String([" !\"#$%&'()*+,-./0123"]), String(testString.match(new RegExp(testPattern)))); 71 "'" + testString + "'.match(new RegExp('" + testPattern + "'))", 72 String(["456789:;<=>?@"]), String(testString.match(new RegExp(testPattern)))); 79 "'" + testString + "'.match(new RegExp('" + testPattern + "'))" [all...] |
ignoreCase.js | 24 Description: 'Tests RegExp attribute ignoreCase' 33 var TITLE = 'RegExp: ignoreCase'; 69 // (new RegExp('xyz','i')).ignoreCase 70 testcases[count++] = new TestCase ( SECTION, "(new RegExp('xyz','i')).ignoreCase", 71 true, (new RegExp('xyz','i')).ignoreCase); 73 // (new RegExp('xyz')).ignoreCase 74 testcases[count++] = new TestCase ( SECTION, "(new RegExp('xyz')).ignoreCase", 75 false, (new RegExp('xyz')).ignoreCase); 77 // 'ABC def ghi'.match(new RegExp('[a-z]+','ig')) 78 testcases[count++] = new TestCase ( SECTION, "'ABC def ghi'.match(new RegExp('[a-z]+','ig'))" [all...] |
octal.js | 33 var TITLE = 'RegExp: \# (octal) '; 47 "'" + testString + "'.match(new RegExp('" + testPattern + "'))", 48 String(["ABCDEFGHIJKLMNOPQRSTUVWXYZ"]), String(testString.match(new RegExp(testPattern)))); 55 "'" + testString + "'.match(new RegExp('" + testPattern + "'))", 56 String(["abcdefghijklmnopqrstuvwxyz"]), String(testString.match(new RegExp(testPattern)))); 63 "'" + testString + "'.match(new RegExp('" + testPattern + "'))", 64 String([" !\"#$%&'()*+,-./0123"]), String(testString.match(new RegExp(testPattern)))); 71 "'" + testString + "'.match(new RegExp('" + testPattern + "'))", 72 String(["456789:;<=>?@"]), String(testString.match(new RegExp(testPattern)))); 79 "'" + testString + "'.match(new RegExp('" + testPattern + "'))" [all...] |
whitespace.js | 33 var TITLE = 'RegExp: \\f\\n\\r\\t\\v\\s\\S '; 46 "'" + whitespace + "'.match(new RegExp('\\s+'))", 47 String([whitespace]), String(whitespace.match(new RegExp('\\s+')))); 51 "'" + non_whitespace + "'.match(new RegExp('\\S+'))", 52 String([non_whitespace]), String(non_whitespace.match(new RegExp('\\S+')))); 56 "'" + non_whitespace + "'.match(new RegExp('\\s'))", 57 null, non_whitespace.match(new RegExp('\\s'))); 61 "'" + whitespace + "'.match(new RegExp('\\S'))", 62 null, whitespace.match(new RegExp('\\S'))); 68 "'" + s + "'.match(new RegExp('\\s+'))" [all...] |
backspace.js | 33 var TITLE = 'RegExp: [\b]'; 41 // 'abc\bdef'.match(new RegExp('.[\b].')) 42 testcases[count++] = new TestCase ( SECTION, "'abc\bdef'.match(new RegExp('.[\\b].'))", 43 String(["c\bd"]), String('abc\bdef'.match(new RegExp('.[\\b].')))); 45 // 'abc\\bdef'.match(new RegExp('.[\b].')) 46 testcases[count++] = new TestCase ( SECTION, "'abc\\bdef'.match(new RegExp('.[\\b].'))", 47 null, 'abc\\bdef'.match(new RegExp('.[\\b].'))); 49 // 'abc\b\b\bdef'.match(new RegExp('c[\b]{3}d')) 50 testcases[count++] = new TestCase ( SECTION, "'abc\b\b\bdef'.match(new RegExp('c[\\b]{3}d'))", 51 String(["c\b\b\bd"]), String('abc\b\b\bdef'.match(new RegExp('c[\\b]{3}d')))) [all...] |
global.js | 24 Description: 'Tests RegExp attribute global' 33 var TITLE = 'RegExp: global'; 61 // (new RegExp('[a-z]','g')).global 62 testcases[count++] = new TestCase ( SECTION, "(new RegExp('[a-z]','g')).global", 63 true, (new RegExp('[a-z]','g')).global); 65 // (new RegExp('[a-z]','i')).global 66 testcases[count++] = new TestCase ( SECTION, "(new RegExp('[a-z]','i')).global", 67 false, (new RegExp('[a-z]','i')).global); 69 // '123 456 789'.match(new RegExp('\\d+','g')) 70 testcases[count++] = new TestCase ( SECTION, "'123 456 789'.match(new RegExp('\\\\d+','g'))" [all...] |
alphanumeric.js | 33 var TITLE = 'RegExp: \\w and \\W'; 46 "'" + alphanumeric + "'.match(new RegExp('\\w+'))", 47 String([alphanumeric]), String(alphanumeric.match(new RegExp('\\w+')))); 51 "'" + non_alphanumeric + "'.match(new RegExp('\\W+'))", 52 String([non_alphanumeric]), String(non_alphanumeric.match(new RegExp('\\W+')))); 56 "'" + non_alphanumeric + "'.match(new RegExp('\\w'))", 57 null, non_alphanumeric.match(new RegExp('\\w'))); 61 "'" + alphanumeric + "'.match(new RegExp('\\W'))", 62 null, alphanumeric.match(new RegExp('\\W'))); 68 "'" + s + "'.match(new RegExp('\\w+'))" [all...] |
digit.js | 33 var TITLE = 'RegExp: \\d'; 47 "'" + digits + "'.match(new RegExp('\\d+'))", 48 String([digits]), String(digits.match(new RegExp('\\d+')))); 52 "'" + non_digits + "'.match(new RegExp('\\D+'))", 53 String([non_digits]), String(non_digits.match(new RegExp('\\D+')))); 57 "'" + non_digits + "'.match(new RegExp('\\d'))", 58 null, non_digits.match(new RegExp('\\d'))); 62 "'" + digits + "'.match(new RegExp('\\D'))", 63 null, digits.match(new RegExp('\\D'))); 69 "'" + s + "'.match(new RegExp('\\d+'))" [all...] |
flags.js | 23 Filename: regexp.js 45 testcases[count++] = new TestCase ( SECTION, "'aBCdEfGHijKLmno'.match(new RegExp('fghijk','i'))", 46 String(["fGHijK"]), String('aBCdEfGHijKLmno'.match(new RegExp("fghijk","i")))); 52 testcases[count++] = new TestCase ( SECTION, "'xa xb xc xd xe xf'.match(new RegExp('x.','g'))", 53 String(["xa","xb","xc","xd","xe","xf"]), String('xa xb xc xd xe xf'.match(new RegExp('x.','g')))); 59 testcases[count++] = new TestCase ( SECTION, "'xa Xb xc xd Xe xf'.match(new RegExp('x.','gi'))", 60 String(["xa","Xb","xc","xd","Xe","xf"]), String('xa Xb xc xd Xe xf'.match(new RegExp('x.','gi')))); 65 testcases[count++] = new TestCase ( SECTION, "'xa Xb xc xd Xe xf'.match(new RegExp('x.','ig'))", 66 String(["xa","Xb","xc","xd","Xe","xf"]), String('xa Xb xc xd Xe xf'.match(new RegExp('x.','ig'))));
|
source.js | 24 Description: 'Tests RegExp attribute source' 33 var TITLE = 'RegExp: source'; 57 // (new RegExp('xyz')).source 58 testcases[count++] = new TestCase ( SECTION, "(new RegExp('xyz')).source", 59 "xyz", (new RegExp('xyz')).source); 61 // (new RegExp('xyz','g')).source 62 testcases[count++] = new TestCase ( SECTION, "(new RegExp('xyz','g')).source", 63 "xyz", (new RegExp('xyz','g')).source); 65 // (new RegExp('abc\\\\def')).source 66 testcases[count++] = new TestCase ( SECTION, "(new RegExp('abc\\\\\\\\def')).source" [all...] |
string_replace.js | 49 // '34 56 78b 12'.replace(new RegExp('[0-9]+b'),'**') 50 testcases[count++] = new TestCase ( SECTION, "'34 56 78b 12'.replace(new RegExp('[0-9]+b'),'**')", 51 "34 56 ** 12", '34 56 78b 12'.replace(new RegExp('[0-9]+b'),'**')); 53 // '34 56 78b 12'.replace(new RegExp('[0-9]+c'),'XX') 54 testcases[count++] = new TestCase ( SECTION, "'34 56 78b 12'.replace(new RegExp('[0-9]+c'),'XX')", 55 "34 56 78b 12", '34 56 78b 12'.replace(new RegExp('[0-9]+c'),'XX')); 57 // 'original'.replace(new RegExp(),'XX') 58 testcases[count++] = new TestCase ( SECTION, "'original'.replace(new RegExp(),'XX')", 59 "XXoriginal", 'original'.replace(new RegExp(),'XX')); 61 // 'qwe ert x\t\n 345654AB'.replace(new RegExp('x\s*\d+(..)$'),'****' [all...] |
test.js | 33 var TITLE = 'RegExp: test'; 58 "(new RegExp('[0-9]{3}')).test('23 2 34 678 9 09')", 59 true, (new RegExp('[0-9]{3}')).test('23 2 34 678 9 09')); 62 "(new RegExp('[0-9]{3}')).test('23 2 34 78 9 09')", 63 false, (new RegExp('[0-9]{3}')).test('23 2 34 78 9 09')); 66 "(new RegExp('\\\\w+ \\\\w+ \\\\w+')).test('do a test')", 67 true, (new RegExp('\\w+ \\w+ \\w+')).test("do a test")); 70 "(new RegExp('\\\\w+ \\\\w+ \\\\w+')).test('a test')", 71 false, (new RegExp('\\w+ \\w+ \\w+')).test("a test"));
|
RegExp_object.js | 33 var TITLE = 'RegExp: object'; 41 var SSN_pattern = new RegExp("\\d{3}-\\d{2}-\\d{4}"); 51 var PHONE_pattern = new RegExp("\\(?(\\d{3})\\)?-?(\\d{3})-(\\d{4})"); 72 var testPattern = new RegExp("(\\d+)45(\\d+)90");
|
/external/webkit/Source/JavaScriptCore/runtime/ |
RegExp.h | 38 class RegExp : public RefCounted<RegExp> { 40 static PassRefPtr<RegExp> create(JSGlobalData* globalData, const UString& pattern, RegExpFlags); 41 ~RegExp(); 60 RegExp(JSGlobalData* globalData, const UString& pattern, RegExpFlags);
|
RegExpCache.cpp | 34 PassRefPtr<RegExp> RegExpCache::lookupOrCreate(const UString& patternString, RegExpFlags flags) 46 PassRefPtr<RegExp> RegExpCache::create(const UString& patternString, RegExpFlags flags, RegExpCacheMap::iterator iterator) 48 RefPtr<RegExp> regExp = RegExp::create(m_globalData, patternString, flags); 51 return regExp; 55 iterator->second = regExp; 67 return regExp;
|
RegExpObject.h | 25 #include "RegExp.h" 33 RegExpObject(JSGlobalObject*, Structure*, NonNullPassRefPtr<RegExp>); 36 void setRegExp(PassRefPtr<RegExp> r) { d->regExp = r; } 37 RegExp* regExp() const { return d->regExp.get(); } 77 RegExpObjectData(NonNullPassRefPtr<RegExp> regExp) 78 : regExp(regExp [all...] |
RegExp.cpp | 24 #include "RegExp.h" 76 inline RegExp::RegExp(JSGlobalData* globalData, const UString& patternString, RegExpFlags flags) 90 RegExp::~RegExp() 94 PassRefPtr<RegExp> RegExp::create(JSGlobalData* globalData, const UString& patternString, RegExpFlags flags) 96 RefPtr<RegExp> res = adoptRef(new RegExp(globalData, patternString, flags)); 103 RegExp::RegExpState RegExp::compile(JSGlobalData* globalData [all...] |
/external/webkit/Source/JavaScriptCore/tests/mozilla/ecma_2/RegExp/ |
properties-001.js | 2 * File Name: RegExp/properties-001.js 9 var SECTION = "RegExp/properties-001.js"; 11 var TITLE = "Properties of RegExp Instances"; 16 AddRegExpCases( new RegExp, "", false, false, false, 0 ); 33 AddTestCase( re + ".test == RegExp.prototype.test", 35 re.test == RegExp.prototype.test ); 37 AddTestCase( re + ".toString == RegExp.prototype.toString", 39 re.toString == RegExp.prototype.toString ); 41 AddTestCase( re + ".contructor == RegExp.prototype.constructor", 43 re.constructor == RegExp.prototype.constructor ) [all...] |
/external/webkit/Source/JavaScriptCore/tests/mozilla/ecma_3/RegExp/ |
regress-220367-002.js | 38 * SUMMARY: Regexp conformance test 46 var summary = 'Regexp conformance test'; 58 actual = RegExp.$1; 63 actual = RegExp.$2; 69 actual = RegExp.$1; 74 actual = RegExp.$2;
|