Best JavaScript code snippet using storybook-root
perlstress-001.js
Source:perlstress-001.js
1/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */2/* ***** BEGIN LICENSE BLOCK *****3 * Version: MPL 1.1/GPL 2.0/LGPL 2.14 *5 * The contents of this file are subject to the Mozilla Public License Version6 * 1.1 (the "License"); you may not use this file except in compliance with7 * the License. You may obtain a copy of the License at8 * http://www.mozilla.org/MPL/9 *10 * Software distributed under the License is distributed on an "AS IS" basis,11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License12 * for the specific language governing rights and limitations under the13 * License.14 *15 * The Original Code is JavaScript Engine testing utilities.16 *17 * The Initial Developer of the Original Code is18 * Netscape Communications Corp.19 * Portions created by the Initial Developer are Copyright (C) 200220 * the Initial Developer. All Rights Reserved.21 *22 * Contributor(s):23 * pschwartau@netscape.com, rogerl@netscape.com24 *25 * Alternatively, the contents of this file may be used under the terms of26 * either the GNU General Public License Version 2 or later (the "GPL"), or27 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),28 * in which case the provisions of the GPL or the LGPL are applicable instead29 * of those above. If you wish to allow use of your version of this file only30 * under the terms of either the GPL or the LGPL, and not to allow others to31 * use your version of this file under the terms of the MPL, indicate your32 * decision by deleting the provisions above and replace them with the notice33 * and other provisions required by the GPL or the LGPL. If you do not delete34 * the provisions above, a recipient may use your version of this file under35 * the terms of any one of the MPL, the GPL or the LGPL.36 *37 * ***** END LICENSE BLOCK ***** */38/*39 *40 * Date: 2002-07-0741 * SUMMARY: Testing JS RegExp engine against Perl 5 RegExp engine.42 * Adjust cnLBOUND, cnUBOUND below to restrict which sections are tested.43 *44 * This test was created by running various patterns and strings through the45 * Perl 5 RegExp engine. We saved the results below to test the JS engine.46 *47 * NOTE: ECMA/JS and Perl do differ on certain points. We have either commented48 * out such sections altogether, or modified them to fit what we expect from JS.49 *50 * EXAMPLES:51 *52 * - In JS, regexp captures (/(a) etc./) must hold |undefined| if not used.53 * See http://bugzilla.mozilla.org/show_bug.cgi?id=123437.54 * By contrast, in Perl, unmatched captures hold the empty string.55 * We have modified such sections accordingly. Example:56 pattern = /^([^a-z])|(\^)$/;57 string = '.';58 actualmatch = string.match(pattern);59 //expectedmatch = Array('.', '.', ''); <<<--- Perl60 expectedmatch = Array('.', '.', undefined); <<<--- JS61 addThis();62 * - In JS, you can't refer to a capture before it's encountered & completed63 *64 * - Perl supports ] & ^] inside a [], ECMA does not65 *66 * - ECMA does support (?: (?= and (?! operators, but doesn't support (?< etc.67 *68 * - ECMA doesn't support (?imsx or (?-imsx69 *70 * - ECMA doesn't support (?(condition)71 *72 * - Perl has \Z has end-of-line, ECMA doesn't73 *74 * - In ECMA, ^ matches only the empty string before the first character75 *76 * - In ECMA, $ matches only the empty string at end of input (unless multiline)77 *78 * - ECMA spec says that each atom in a range must be a single character79 *80 * - ECMA doesn't support \A81 *82 * - ECMA doesn't have rules for [:83 *84 */85//-----------------------------------------------------------------------------86var gTestfile = 'perlstress-001.js';87var i = 0;88var BUGNUMBER = 85721;89var summary = 'Testing regular expression edge cases';90var cnSingleSpace = ' ';91var status = '';92var statusmessages = new Array();93var pattern = '';94var patterns = new Array();95var string = '';96var strings = new Array();97var actualmatch = '';98var actualmatches = new Array();99var expectedmatch = '';100var expectedmatches = new Array();101var cnLBOUND = 1;102var cnUBOUND = 1000;103status = inSection(1);104pattern = /abc/;105string = 'abc';106actualmatch = string.match(pattern);107expectedmatch = Array('abc');108addThis();109status = inSection(2);110pattern = /abc/;111string = 'xabcy';112actualmatch = string.match(pattern);113expectedmatch = Array('abc');114addThis();115status = inSection(3);116pattern = /abc/;117string = 'ababc';118actualmatch = string.match(pattern);119expectedmatch = Array('abc');120addThis();121status = inSection(4);122pattern = /ab*c/;123string = 'abc';124actualmatch = string.match(pattern);125expectedmatch = Array('abc');126addThis();127status = inSection(5);128pattern = /ab*bc/;129string = 'abc';130actualmatch = string.match(pattern);131expectedmatch = Array('abc');132addThis();133status = inSection(6);134pattern = /ab*bc/;135string = 'abbc';136actualmatch = string.match(pattern);137expectedmatch = Array('abbc');138addThis();139status = inSection(7);140pattern = /ab*bc/;141string = 'abbbbc';142actualmatch = string.match(pattern);143expectedmatch = Array('abbbbc');144addThis();145status = inSection(8);146pattern = /.{1}/;147string = 'abbbbc';148actualmatch = string.match(pattern);149expectedmatch = Array('a');150addThis();151status = inSection(9);152pattern = /.{3,4}/;153string = 'abbbbc';154actualmatch = string.match(pattern);155expectedmatch = Array('abbb');156addThis();157status = inSection(10);158pattern = /ab{0,}bc/;159string = 'abbbbc';160actualmatch = string.match(pattern);161expectedmatch = Array('abbbbc');162addThis();163status = inSection(11);164pattern = /ab+bc/;165string = 'abbc';166actualmatch = string.match(pattern);167expectedmatch = Array('abbc');168addThis();169status = inSection(12);170pattern = /ab+bc/;171string = 'abbbbc';172actualmatch = string.match(pattern);173expectedmatch = Array('abbbbc');174addThis();175status = inSection(13);176pattern = /ab{1,}bc/;177string = 'abbbbc';178actualmatch = string.match(pattern);179expectedmatch = Array('abbbbc');180addThis();181status = inSection(14);182pattern = /ab{1,3}bc/;183string = 'abbbbc';184actualmatch = string.match(pattern);185expectedmatch = Array('abbbbc');186addThis();187status = inSection(15);188pattern = /ab{3,4}bc/;189string = 'abbbbc';190actualmatch = string.match(pattern);191expectedmatch = Array('abbbbc');192addThis();193status = inSection(16);194pattern = /ab?bc/;195string = 'abbc';196actualmatch = string.match(pattern);197expectedmatch = Array('abbc');198addThis();199status = inSection(17);200pattern = /ab?bc/;201string = 'abc';202actualmatch = string.match(pattern);203expectedmatch = Array('abc');204addThis();205status = inSection(18);206pattern = /ab{0,1}bc/;207string = 'abc';208actualmatch = string.match(pattern);209expectedmatch = Array('abc');210addThis();211status = inSection(19);212pattern = /ab?c/;213string = 'abc';214actualmatch = string.match(pattern);215expectedmatch = Array('abc');216addThis();217status = inSection(20);218pattern = /ab{0,1}c/;219string = 'abc';220actualmatch = string.match(pattern);221expectedmatch = Array('abc');222addThis();223status = inSection(21);224pattern = /^abc$/;225string = 'abc';226actualmatch = string.match(pattern);227expectedmatch = Array('abc');228addThis();229status = inSection(22);230pattern = /^abc/;231string = 'abcc';232actualmatch = string.match(pattern);233expectedmatch = Array('abc');234addThis();235status = inSection(23);236pattern = /abc$/;237string = 'aabc';238actualmatch = string.match(pattern);239expectedmatch = Array('abc');240addThis();241status = inSection(24);242pattern = /^/;243string = 'abc';244actualmatch = string.match(pattern);245expectedmatch = Array('');246addThis();247status = inSection(25);248pattern = /$/;249string = 'abc';250actualmatch = string.match(pattern);251expectedmatch = Array('');252addThis();253status = inSection(26);254pattern = /a.c/;255string = 'abc';256actualmatch = string.match(pattern);257expectedmatch = Array('abc');258addThis();259status = inSection(27);260pattern = /a.c/;261string = 'axc';262actualmatch = string.match(pattern);263expectedmatch = Array('axc');264addThis();265status = inSection(28);266pattern = /a.*c/;267string = 'axyzc';268actualmatch = string.match(pattern);269expectedmatch = Array('axyzc');270addThis();271status = inSection(29);272pattern = /a[bc]d/;273string = 'abd';274actualmatch = string.match(pattern);275expectedmatch = Array('abd');276addThis();277status = inSection(30);278pattern = /a[b-d]e/;279string = 'ace';280actualmatch = string.match(pattern);281expectedmatch = Array('ace');282addThis();283status = inSection(31);284pattern = /a[b-d]/;285string = 'aac';286actualmatch = string.match(pattern);287expectedmatch = Array('ac');288addThis();289status = inSection(32);290pattern = /a[-b]/;291string = 'a-';292actualmatch = string.match(pattern);293expectedmatch = Array('a-');294addThis();295status = inSection(33);296pattern = /a[b-]/;297string = 'a-';298actualmatch = string.match(pattern);299expectedmatch = Array('a-');300addThis();301status = inSection(34);302pattern = /a]/;303string = 'a]';304actualmatch = string.match(pattern);305expectedmatch = Array('a]');306addThis();307/* Perl supports ] & ^] inside a [], ECMA does not308 pattern = /a[]]b/;309 status = inSection(35);310 string = 'a]b';311 actualmatch = string.match(pattern);312 expectedmatch = Array('a]b');313 addThis();314*/315status = inSection(36);316pattern = /a[^bc]d/;317string = 'aed';318actualmatch = string.match(pattern);319expectedmatch = Array('aed');320addThis();321status = inSection(37);322pattern = /a[^-b]c/;323string = 'adc';324actualmatch = string.match(pattern);325expectedmatch = Array('adc');326addThis();327/* Perl supports ] & ^] inside a [], ECMA does not328 status = inSection(38);329 pattern = /a[^]b]c/;330 string = 'adc';331 actualmatch = string.match(pattern);332 expectedmatch = Array('adc');333 addThis();334*/335status = inSection(39);336pattern = /\ba\b/;337string = 'a-';338actualmatch = string.match(pattern);339expectedmatch = Array('a');340addThis();341status = inSection(40);342pattern = /\ba\b/;343string = '-a';344actualmatch = string.match(pattern);345expectedmatch = Array('a');346addThis();347status = inSection(41);348pattern = /\ba\b/;349string = '-a-';350actualmatch = string.match(pattern);351expectedmatch = Array('a');352addThis();353status = inSection(42);354pattern = /\By\b/;355string = 'xy';356actualmatch = string.match(pattern);357expectedmatch = Array('y');358addThis();359status = inSection(43);360pattern = /\by\B/;361string = 'yz';362actualmatch = string.match(pattern);363expectedmatch = Array('y');364addThis();365status = inSection(44);366pattern = /\By\B/;367string = 'xyz';368actualmatch = string.match(pattern);369expectedmatch = Array('y');370addThis();371status = inSection(45);372pattern = /\w/;373string = 'a';374actualmatch = string.match(pattern);375expectedmatch = Array('a');376addThis();377status = inSection(46);378pattern = /\W/;379string = '-';380actualmatch = string.match(pattern);381expectedmatch = Array('-');382addThis();383status = inSection(47);384pattern = /a\Sb/;385string = 'a-b';386actualmatch = string.match(pattern);387expectedmatch = Array('a-b');388addThis();389status = inSection(48);390pattern = /\d/;391string = '1';392actualmatch = string.match(pattern);393expectedmatch = Array('1');394addThis();395status = inSection(49);396pattern = /\D/;397string = '-';398actualmatch = string.match(pattern);399expectedmatch = Array('-');400addThis();401status = inSection(50);402pattern = /[\w]/;403string = 'a';404actualmatch = string.match(pattern);405expectedmatch = Array('a');406addThis();407status = inSection(51);408pattern = /[\W]/;409string = '-';410actualmatch = string.match(pattern);411expectedmatch = Array('-');412addThis();413status = inSection(52);414pattern = /a[\S]b/;415string = 'a-b';416actualmatch = string.match(pattern);417expectedmatch = Array('a-b');418addThis();419status = inSection(53);420pattern = /[\d]/;421string = '1';422actualmatch = string.match(pattern);423expectedmatch = Array('1');424addThis();425status = inSection(54);426pattern = /[\D]/;427string = '-';428actualmatch = string.match(pattern);429expectedmatch = Array('-');430addThis();431status = inSection(55);432pattern = /ab|cd/;433string = 'abc';434actualmatch = string.match(pattern);435expectedmatch = Array('ab');436addThis();437status = inSection(56);438pattern = /ab|cd/;439string = 'abcd';440actualmatch = string.match(pattern);441expectedmatch = Array('ab');442addThis();443status = inSection(57);444pattern = /()ef/;445string = 'def';446actualmatch = string.match(pattern);447expectedmatch = Array('ef', '');448addThis();449status = inSection(58);450pattern = /a\(b/;451string = 'a(b';452actualmatch = string.match(pattern);453expectedmatch = Array('a(b');454addThis();455status = inSection(59);456pattern = /a\(*b/;457string = 'ab';458actualmatch = string.match(pattern);459expectedmatch = Array('ab');460addThis();461status = inSection(60);462pattern = /a\(*b/;463string = 'a((b';464actualmatch = string.match(pattern);465expectedmatch = Array('a((b');466addThis();467status = inSection(61);468pattern = /a\\b/;469string = 'a\\b';470actualmatch = string.match(pattern);471expectedmatch = Array('a\\b');472addThis();473status = inSection(62);474pattern = /((a))/;475string = 'abc';476actualmatch = string.match(pattern);477expectedmatch = Array('a', 'a', 'a');478addThis();479status = inSection(63);480pattern = /(a)b(c)/;481string = 'abc';482actualmatch = string.match(pattern);483expectedmatch = Array('abc', 'a', 'c');484addThis();485status = inSection(64);486pattern = /a+b+c/;487string = 'aabbabc';488actualmatch = string.match(pattern);489expectedmatch = Array('abc');490addThis();491status = inSection(65);492pattern = /a{1,}b{1,}c/;493string = 'aabbabc';494actualmatch = string.match(pattern);495expectedmatch = Array('abc');496addThis();497status = inSection(66);498pattern = /a.+?c/;499string = 'abcabc';500actualmatch = string.match(pattern);501expectedmatch = Array('abc');502addThis();503status = inSection(67);504pattern = /(a+|b)*/;505string = 'ab';506actualmatch = string.match(pattern);507expectedmatch = Array('ab', 'b');508addThis();509status = inSection(68);510pattern = /(a+|b){0,}/;511string = 'ab';512actualmatch = string.match(pattern);513expectedmatch = Array('ab', 'b');514addThis();515status = inSection(69);516pattern = /(a+|b)+/;517string = 'ab';518actualmatch = string.match(pattern);519expectedmatch = Array('ab', 'b');520addThis();521status = inSection(70);522pattern = /(a+|b){1,}/;523string = 'ab';524actualmatch = string.match(pattern);525expectedmatch = Array('ab', 'b');526addThis();527status = inSection(71);528pattern = /(a+|b)?/;529string = 'ab';530actualmatch = string.match(pattern);531expectedmatch = Array('a', 'a');532addThis();533status = inSection(72);534pattern = /(a+|b){0,1}/;535string = 'ab';536actualmatch = string.match(pattern);537expectedmatch = Array('a', 'a');538addThis();539status = inSection(73);540pattern = /[^ab]*/;541string = 'cde';542actualmatch = string.match(pattern);543expectedmatch = Array('cde');544addThis();545status = inSection(74);546pattern = /([abc])*d/;547string = 'abbbcd';548actualmatch = string.match(pattern);549expectedmatch = Array('abbbcd', 'c');550addThis();551status = inSection(75);552pattern = /([abc])*bcd/;553string = 'abcd';554actualmatch = string.match(pattern);555expectedmatch = Array('abcd', 'a');556addThis();557status = inSection(76);558pattern = /a|b|c|d|e/;559string = 'e';560actualmatch = string.match(pattern);561expectedmatch = Array('e');562addThis();563status = inSection(77);564pattern = /(a|b|c|d|e)f/;565string = 'ef';566actualmatch = string.match(pattern);567expectedmatch = Array('ef', 'e');568addThis();569status = inSection(78);570pattern = /abcd*efg/;571string = 'abcdefg';572actualmatch = string.match(pattern);573expectedmatch = Array('abcdefg');574addThis();575status = inSection(79);576pattern = /ab*/;577string = 'xabyabbbz';578actualmatch = string.match(pattern);579expectedmatch = Array('ab');580addThis();581status = inSection(80);582pattern = /ab*/;583string = 'xayabbbz';584actualmatch = string.match(pattern);585expectedmatch = Array('a');586addThis();587status = inSection(81);588pattern = /(ab|cd)e/;589string = 'abcde';590actualmatch = string.match(pattern);591expectedmatch = Array('cde', 'cd');592addThis();593status = inSection(82);594pattern = /[abhgefdc]ij/;595string = 'hij';596actualmatch = string.match(pattern);597expectedmatch = Array('hij');598addThis();599status = inSection(83);600pattern = /(abc|)ef/;601string = 'abcdef';602actualmatch = string.match(pattern);603expectedmatch = Array('ef', '');604addThis();605status = inSection(84);606pattern = /(a|b)c*d/;607string = 'abcd';608actualmatch = string.match(pattern);609expectedmatch = Array('bcd', 'b');610addThis();611status = inSection(85);612pattern = /(ab|ab*)bc/;613string = 'abc';614actualmatch = string.match(pattern);615expectedmatch = Array('abc', 'a');616addThis();617status = inSection(86);618pattern = /a([bc]*)c*/;619string = 'abc';620actualmatch = string.match(pattern);621expectedmatch = Array('abc', 'bc');622addThis();623status = inSection(87);624pattern = /a([bc]*)(c*d)/;625string = 'abcd';626actualmatch = string.match(pattern);627expectedmatch = Array('abcd', 'bc', 'd');628addThis();629status = inSection(88);630pattern = /a([bc]+)(c*d)/;631string = 'abcd';632actualmatch = string.match(pattern);633expectedmatch = Array('abcd', 'bc', 'd');634addThis();635status = inSection(89);636pattern = /a([bc]*)(c+d)/;637string = 'abcd';638actualmatch = string.match(pattern);639expectedmatch = Array('abcd', 'b', 'cd');640addThis();641status = inSection(90);642pattern = /a[bcd]*dcdcde/;643string = 'adcdcde';644actualmatch = string.match(pattern);645expectedmatch = Array('adcdcde');646addThis();647status = inSection(91);648pattern = /(ab|a)b*c/;649string = 'abc';650actualmatch = string.match(pattern);651expectedmatch = Array('abc', 'ab');652addThis();653status = inSection(92);654pattern = /((a)(b)c)(d)/;655string = 'abcd';656actualmatch = string.match(pattern);657expectedmatch = Array('abcd', 'abc', 'a', 'b', 'd');658addThis();659status = inSection(93);660pattern = /[a-zA-Z_][a-zA-Z0-9_]*/;661string = 'alpha';662actualmatch = string.match(pattern);663expectedmatch = Array('alpha');664addThis();665status = inSection(94);666pattern = /^a(bc+|b[eh])g|.h$/;667string = 'abh';668actualmatch = string.match(pattern);669expectedmatch = Array('bh', undefined);670addThis();671status = inSection(95);672pattern = /(bc+d$|ef*g.|h?i(j|k))/;673string = 'effgz';674actualmatch = string.match(pattern);675expectedmatch = Array('effgz', 'effgz', undefined);676addThis();677status = inSection(96);678pattern = /(bc+d$|ef*g.|h?i(j|k))/;679string = 'ij';680actualmatch = string.match(pattern);681expectedmatch = Array('ij', 'ij', 'j');682addThis();683status = inSection(97);684pattern = /(bc+d$|ef*g.|h?i(j|k))/;685string = 'reffgz';686actualmatch = string.match(pattern);687expectedmatch = Array('effgz', 'effgz', undefined);688addThis();689status = inSection(98);690pattern = /((((((((((a))))))))))/;691string = 'a';692actualmatch = string.match(pattern);693expectedmatch = Array('a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a');694addThis();695status = inSection(99);696pattern = /((((((((((a))))))))))\10/;697string = 'aa';698actualmatch = string.match(pattern);699expectedmatch = Array('aa', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a');700addThis();701status = inSection(100);702pattern = /((((((((((a))))))))))/;703string = 'a!';704actualmatch = string.match(pattern);705expectedmatch = Array('a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a');706addThis();707status = inSection(101);708pattern = /(((((((((a)))))))))/;709string = 'a';710actualmatch = string.match(pattern);711expectedmatch = Array('a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a');712addThis();713status = inSection(102);714pattern = /(.*)c(.*)/;715string = 'abcde';716actualmatch = string.match(pattern);717expectedmatch = Array('abcde', 'ab', 'de');718addThis();719status = inSection(103);720pattern = /abcd/;721string = 'abcd';722actualmatch = string.match(pattern);723expectedmatch = Array('abcd');724addThis();725status = inSection(104);726pattern = /a(bc)d/;727string = 'abcd';728actualmatch = string.match(pattern);729expectedmatch = Array('abcd', 'bc');730addThis();731status = inSection(105);732pattern = /a[-]?c/;733string = 'ac';734actualmatch = string.match(pattern);735expectedmatch = Array('ac');736addThis();737status = inSection(106);738pattern = /(abc)\1/;739string = 'abcabc';740actualmatch = string.match(pattern);741expectedmatch = Array('abcabc', 'abc');742addThis();743status = inSection(107);744pattern = /([a-c]*)\1/;745string = 'abcabc';746actualmatch = string.match(pattern);747expectedmatch = Array('abcabc', 'abc');748addThis();749status = inSection(108);750pattern = /(a)|\1/;751string = 'a';752actualmatch = string.match(pattern);753expectedmatch = Array('a', 'a');754addThis();755status = inSection(109);756pattern = /(([a-c])b*?\2)*/;757string = 'ababbbcbc';758actualmatch = string.match(pattern);759expectedmatch = Array('ababb', 'bb', 'b');760addThis();761status = inSection(110);762pattern = /(([a-c])b*?\2){3}/;763string = 'ababbbcbc';764actualmatch = string.match(pattern);765expectedmatch = Array('ababbbcbc', 'cbc', 'c');766addThis();767/* Can't refer to a capture before it's encountered & completed768 status = inSection(111);769 pattern = /((\3|b)\2(a)x)+/;770 string = 'aaaxabaxbaaxbbax';771 actualmatch = string.match(pattern);772 expectedmatch = Array('bbax', 'bbax', 'b', 'a');773 addThis();774 status = inSection(112);775 pattern = /((\3|b)\2(a)){2,}/;776 string = 'bbaababbabaaaaabbaaaabba';777 actualmatch = string.match(pattern);778 expectedmatch = Array('bbaaaabba', 'bba', 'b', 'a');779 addThis();780*/781status = inSection(113);782pattern = /abc/i;783string = 'ABC';784actualmatch = string.match(pattern);785expectedmatch = Array('ABC');786addThis();787status = inSection(114);788pattern = /abc/i;789string = 'XABCY';790actualmatch = string.match(pattern);791expectedmatch = Array('ABC');792addThis();793status = inSection(115);794pattern = /abc/i;795string = 'ABABC';796actualmatch = string.match(pattern);797expectedmatch = Array('ABC');798addThis();799status = inSection(116);800pattern = /ab*c/i;801string = 'ABC';802actualmatch = string.match(pattern);803expectedmatch = Array('ABC');804addThis();805status = inSection(117);806pattern = /ab*bc/i;807string = 'ABC';808actualmatch = string.match(pattern);809expectedmatch = Array('ABC');810addThis();811status = inSection(118);812pattern = /ab*bc/i;813string = 'ABBC';814actualmatch = string.match(pattern);815expectedmatch = Array('ABBC');816addThis();817status = inSection(119);818pattern = /ab*?bc/i;819string = 'ABBBBC';820actualmatch = string.match(pattern);821expectedmatch = Array('ABBBBC');822addThis();823status = inSection(120);824pattern = /ab{0,}?bc/i;825string = 'ABBBBC';826actualmatch = string.match(pattern);827expectedmatch = Array('ABBBBC');828addThis();829status = inSection(121);830pattern = /ab+?bc/i;831string = 'ABBC';832actualmatch = string.match(pattern);833expectedmatch = Array('ABBC');834addThis();835status = inSection(122);836pattern = /ab+bc/i;837string = 'ABBBBC';838actualmatch = string.match(pattern);839expectedmatch = Array('ABBBBC');840addThis();841status = inSection(123);842pattern = /ab{1,}?bc/i;843string = 'ABBBBC';844actualmatch = string.match(pattern);845expectedmatch = Array('ABBBBC');846addThis();847status = inSection(124);848pattern = /ab{1,3}?bc/i;849string = 'ABBBBC';850actualmatch = string.match(pattern);851expectedmatch = Array('ABBBBC');852addThis();853status = inSection(125);854pattern = /ab{3,4}?bc/i;855string = 'ABBBBC';856actualmatch = string.match(pattern);857expectedmatch = Array('ABBBBC');858addThis();859status = inSection(126);860pattern = /ab??bc/i;861string = 'ABBC';862actualmatch = string.match(pattern);863expectedmatch = Array('ABBC');864addThis();865status = inSection(127);866pattern = /ab??bc/i;867string = 'ABC';868actualmatch = string.match(pattern);869expectedmatch = Array('ABC');870addThis();871status = inSection(128);872pattern = /ab{0,1}?bc/i;873string = 'ABC';874actualmatch = string.match(pattern);875expectedmatch = Array('ABC');876addThis();877status = inSection(129);878pattern = /ab??c/i;879string = 'ABC';880actualmatch = string.match(pattern);881expectedmatch = Array('ABC');882addThis();883status = inSection(130);884pattern = /ab{0,1}?c/i;885string = 'ABC';886actualmatch = string.match(pattern);887expectedmatch = Array('ABC');888addThis();889status = inSection(131);890pattern = /^abc$/i;891string = 'ABC';892actualmatch = string.match(pattern);893expectedmatch = Array('ABC');894addThis();895status = inSection(132);896pattern = /^abc/i;897string = 'ABCC';898actualmatch = string.match(pattern);899expectedmatch = Array('ABC');900addThis();901status = inSection(133);902pattern = /abc$/i;903string = 'AABC';904actualmatch = string.match(pattern);905expectedmatch = Array('ABC');906addThis();907status = inSection(134);908pattern = /^/i;909string = 'ABC';910actualmatch = string.match(pattern);911expectedmatch = Array('');912addThis();913status = inSection(135);914pattern = /$/i;915string = 'ABC';916actualmatch = string.match(pattern);917expectedmatch = Array('');918addThis();919status = inSection(136);920pattern = /a.c/i;921string = 'ABC';922actualmatch = string.match(pattern);923expectedmatch = Array('ABC');924addThis();925status = inSection(137);926pattern = /a.c/i;927string = 'AXC';928actualmatch = string.match(pattern);929expectedmatch = Array('AXC');930addThis();931status = inSection(138);932pattern = /a.*?c/i;933string = 'AXYZC';934actualmatch = string.match(pattern);935expectedmatch = Array('AXYZC');936addThis();937status = inSection(139);938pattern = /a[bc]d/i;939string = 'ABD';940actualmatch = string.match(pattern);941expectedmatch = Array('ABD');942addThis();943status = inSection(140);944pattern = /a[b-d]e/i;945string = 'ACE';946actualmatch = string.match(pattern);947expectedmatch = Array('ACE');948addThis();949status = inSection(141);950pattern = /a[b-d]/i;951string = 'AAC';952actualmatch = string.match(pattern);953expectedmatch = Array('AC');954addThis();955status = inSection(142);956pattern = /a[-b]/i;957string = 'A-';958actualmatch = string.match(pattern);959expectedmatch = Array('A-');960addThis();961status = inSection(143);962pattern = /a[b-]/i;963string = 'A-';964actualmatch = string.match(pattern);965expectedmatch = Array('A-');966addThis();967status = inSection(144);968pattern = /a]/i;969string = 'A]';970actualmatch = string.match(pattern);971expectedmatch = Array('A]');972addThis();973/* Perl supports ] & ^] inside a [], ECMA does not974 status = inSection(145);975 pattern = /a[]]b/i;976 string = 'A]B';977 actualmatch = string.match(pattern);978 expectedmatch = Array('A]B');979 addThis();980*/981status = inSection(146);982pattern = /a[^bc]d/i;983string = 'AED';984actualmatch = string.match(pattern);985expectedmatch = Array('AED');986addThis();987status = inSection(147);988pattern = /a[^-b]c/i;989string = 'ADC';990actualmatch = string.match(pattern);991expectedmatch = Array('ADC');992addThis();993/* Perl supports ] & ^] inside a [], ECMA does not994 status = inSection(148);995 pattern = /a[^]b]c/i;996 string = 'ADC';997 actualmatch = string.match(pattern);998 expectedmatch = Array('ADC');999 addThis();1000*/1001status = inSection(149);1002pattern = /ab|cd/i;1003string = 'ABC';1004actualmatch = string.match(pattern);1005expectedmatch = Array('AB');1006addThis();1007status = inSection(150);1008pattern = /ab|cd/i;1009string = 'ABCD';1010actualmatch = string.match(pattern);1011expectedmatch = Array('AB');1012addThis();1013status = inSection(151);1014pattern = /()ef/i;1015string = 'DEF';1016actualmatch = string.match(pattern);1017expectedmatch = Array('EF', '');1018addThis();1019status = inSection(152);1020pattern = /a\(b/i;1021string = 'A(B';1022actualmatch = string.match(pattern);1023expectedmatch = Array('A(B');1024addThis();1025status = inSection(153);1026pattern = /a\(*b/i;1027string = 'AB';1028actualmatch = string.match(pattern);1029expectedmatch = Array('AB');1030addThis();1031status = inSection(154);1032pattern = /a\(*b/i;1033string = 'A((B';1034actualmatch = string.match(pattern);1035expectedmatch = Array('A((B');1036addThis();1037status = inSection(155);1038pattern = /a\\b/i;1039string = 'A\\B';1040actualmatch = string.match(pattern);1041expectedmatch = Array('A\\B');1042addThis();1043status = inSection(156);1044pattern = /((a))/i;1045string = 'ABC';1046actualmatch = string.match(pattern);1047expectedmatch = Array('A', 'A', 'A');1048addThis();1049status = inSection(157);1050pattern = /(a)b(c)/i;1051string = 'ABC';1052actualmatch = string.match(pattern);1053expectedmatch = Array('ABC', 'A', 'C');1054addThis();1055status = inSection(158);1056pattern = /a+b+c/i;1057string = 'AABBABC';1058actualmatch = string.match(pattern);1059expectedmatch = Array('ABC');1060addThis();1061status = inSection(159);1062pattern = /a{1,}b{1,}c/i;1063string = 'AABBABC';1064actualmatch = string.match(pattern);1065expectedmatch = Array('ABC');1066addThis();1067status = inSection(160);1068pattern = /a.+?c/i;1069string = 'ABCABC';1070actualmatch = string.match(pattern);1071expectedmatch = Array('ABC');1072addThis();1073status = inSection(161);1074pattern = /a.*?c/i;1075string = 'ABCABC';1076actualmatch = string.match(pattern);1077expectedmatch = Array('ABC');1078addThis();1079status = inSection(162);1080pattern = /a.{0,5}?c/i;1081string = 'ABCABC';1082actualmatch = string.match(pattern);1083expectedmatch = Array('ABC');1084addThis();1085status = inSection(163);1086pattern = /(a+|b)*/i;1087string = 'AB';1088actualmatch = string.match(pattern);1089expectedmatch = Array('AB', 'B');1090addThis();1091status = inSection(164);1092pattern = /(a+|b){0,}/i;1093string = 'AB';1094actualmatch = string.match(pattern);1095expectedmatch = Array('AB', 'B');1096addThis();1097status = inSection(165);1098pattern = /(a+|b)+/i;1099string = 'AB';1100actualmatch = string.match(pattern);1101expectedmatch = Array('AB', 'B');1102addThis();1103status = inSection(166);1104pattern = /(a+|b){1,}/i;1105string = 'AB';1106actualmatch = string.match(pattern);1107expectedmatch = Array('AB', 'B');1108addThis();1109status = inSection(167);1110pattern = /(a+|b)?/i;1111string = 'AB';1112actualmatch = string.match(pattern);1113expectedmatch = Array('A', 'A');1114addThis();1115status = inSection(168);1116pattern = /(a+|b){0,1}/i;1117string = 'AB';1118actualmatch = string.match(pattern);1119expectedmatch = Array('A', 'A');1120addThis();1121status = inSection(169);1122pattern = /(a+|b){0,1}?/i;1123string = 'AB';1124actualmatch = string.match(pattern);1125expectedmatch = Array('', undefined);1126addThis();1127status = inSection(170);1128pattern = /[^ab]*/i;1129string = 'CDE';1130actualmatch = string.match(pattern);1131expectedmatch = Array('CDE');1132addThis();1133status = inSection(171);1134pattern = /([abc])*d/i;1135string = 'ABBBCD';1136actualmatch = string.match(pattern);1137expectedmatch = Array('ABBBCD', 'C');1138addThis();1139status = inSection(172);1140pattern = /([abc])*bcd/i;1141string = 'ABCD';1142actualmatch = string.match(pattern);1143expectedmatch = Array('ABCD', 'A');1144addThis();1145status = inSection(173);1146pattern = /a|b|c|d|e/i;1147string = 'E';1148actualmatch = string.match(pattern);1149expectedmatch = Array('E');1150addThis();1151status = inSection(174);1152pattern = /(a|b|c|d|e)f/i;1153string = 'EF';1154actualmatch = string.match(pattern);1155expectedmatch = Array('EF', 'E');1156addThis();1157status = inSection(175);1158pattern = /abcd*efg/i;1159string = 'ABCDEFG';1160actualmatch = string.match(pattern);1161expectedmatch = Array('ABCDEFG');1162addThis();1163status = inSection(176);1164pattern = /ab*/i;1165string = 'XABYABBBZ';1166actualmatch = string.match(pattern);1167expectedmatch = Array('AB');1168addThis();1169status = inSection(177);1170pattern = /ab*/i;1171string = 'XAYABBBZ';1172actualmatch = string.match(pattern);1173expectedmatch = Array('A');1174addThis();1175status = inSection(178);1176pattern = /(ab|cd)e/i;1177string = 'ABCDE';1178actualmatch = string.match(pattern);1179expectedmatch = Array('CDE', 'CD');1180addThis();1181status = inSection(179);1182pattern = /[abhgefdc]ij/i;1183string = 'HIJ';1184actualmatch = string.match(pattern);1185expectedmatch = Array('HIJ');1186addThis();1187status = inSection(180);1188pattern = /(abc|)ef/i;1189string = 'ABCDEF';1190actualmatch = string.match(pattern);1191expectedmatch = Array('EF', '');1192addThis();1193status = inSection(181);1194pattern = /(a|b)c*d/i;1195string = 'ABCD';1196actualmatch = string.match(pattern);1197expectedmatch = Array('BCD', 'B');1198addThis();1199status = inSection(182);1200pattern = /(ab|ab*)bc/i;1201string = 'ABC';1202actualmatch = string.match(pattern);1203expectedmatch = Array('ABC', 'A');1204addThis();1205status = inSection(183);1206pattern = /a([bc]*)c*/i;1207string = 'ABC';1208actualmatch = string.match(pattern);1209expectedmatch = Array('ABC', 'BC');1210addThis();1211status = inSection(184);1212pattern = /a([bc]*)(c*d)/i;1213string = 'ABCD';1214actualmatch = string.match(pattern);1215expectedmatch = Array('ABCD', 'BC', 'D');1216addThis();1217status = inSection(185);1218pattern = /a([bc]+)(c*d)/i;1219string = 'ABCD';1220actualmatch = string.match(pattern);1221expectedmatch = Array('ABCD', 'BC', 'D');1222addThis();1223status = inSection(186);1224pattern = /a([bc]*)(c+d)/i;1225string = 'ABCD';1226actualmatch = string.match(pattern);1227expectedmatch = Array('ABCD', 'B', 'CD');1228addThis();1229status = inSection(187);1230pattern = /a[bcd]*dcdcde/i;1231string = 'ADCDCDE';1232actualmatch = string.match(pattern);1233expectedmatch = Array('ADCDCDE');1234addThis();1235status = inSection(188);1236pattern = /(ab|a)b*c/i;1237string = 'ABC';1238actualmatch = string.match(pattern);1239expectedmatch = Array('ABC', 'AB');1240addThis();1241status = inSection(189);1242pattern = /((a)(b)c)(d)/i;1243string = 'ABCD';1244actualmatch = string.match(pattern);1245expectedmatch = Array('ABCD', 'ABC', 'A', 'B', 'D');1246addThis();1247status = inSection(190);1248pattern = /[a-zA-Z_][a-zA-Z0-9_]*/i;1249string = 'ALPHA';1250actualmatch = string.match(pattern);1251expectedmatch = Array('ALPHA');1252addThis();1253status = inSection(191);1254pattern = /^a(bc+|b[eh])g|.h$/i;1255string = 'ABH';1256actualmatch = string.match(pattern);1257expectedmatch = Array('BH', undefined);1258addThis();1259status = inSection(192);1260pattern = /(bc+d$|ef*g.|h?i(j|k))/i;1261string = 'EFFGZ';1262actualmatch = string.match(pattern);1263expectedmatch = Array('EFFGZ', 'EFFGZ', undefined);1264addThis();1265status = inSection(193);1266pattern = /(bc+d$|ef*g.|h?i(j|k))/i;1267string = 'IJ';1268actualmatch = string.match(pattern);1269expectedmatch = Array('IJ', 'IJ', 'J');1270addThis();1271status = inSection(194);1272pattern = /(bc+d$|ef*g.|h?i(j|k))/i;1273string = 'REFFGZ';1274actualmatch = string.match(pattern);1275expectedmatch = Array('EFFGZ', 'EFFGZ', undefined);1276addThis();1277status = inSection(195);1278pattern = /((((((((((a))))))))))/i;1279string = 'A';1280actualmatch = string.match(pattern);1281expectedmatch = Array('A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A');1282addThis();1283status = inSection(196);1284pattern = /((((((((((a))))))))))\10/i;1285string = 'AA';1286actualmatch = string.match(pattern);1287expectedmatch = Array('AA', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A');1288addThis();1289status = inSection(197);1290pattern = /((((((((((a))))))))))/i;1291string = 'A!';1292actualmatch = string.match(pattern);1293expectedmatch = Array('A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A');1294addThis();1295status = inSection(198);1296pattern = /(((((((((a)))))))))/i;1297string = 'A';1298actualmatch = string.match(pattern);1299expectedmatch = Array('A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A', 'A');1300addThis();1301status = inSection(199);1302pattern = /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))/i;1303string = 'A';1304actualmatch = string.match(pattern);1305expectedmatch = Array('A', 'A');1306addThis();1307status = inSection(200);1308pattern = /(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))/i;1309string = 'C';1310actualmatch = string.match(pattern);1311expectedmatch = Array('C', 'C');1312addThis();1313status = inSection(201);1314pattern = /(.*)c(.*)/i;1315string = 'ABCDE';1316actualmatch = string.match(pattern);1317expectedmatch = Array('ABCDE', 'AB', 'DE');1318addThis();1319status = inSection(202);1320pattern = /abcd/i;1321string = 'ABCD';1322actualmatch = string.match(pattern);1323expectedmatch = Array('ABCD');1324addThis();1325status = inSection(203);1326pattern = /a(bc)d/i;1327string = 'ABCD';1328actualmatch = string.match(pattern);1329expectedmatch = Array('ABCD', 'BC');1330addThis();1331status = inSection(204);1332pattern = /a[-]?c/i;1333string = 'AC';1334actualmatch = string.match(pattern);1335expectedmatch = Array('AC');1336addThis();1337status = inSection(205);1338pattern = /(abc)\1/i;1339string = 'ABCABC';1340actualmatch = string.match(pattern);1341expectedmatch = Array('ABCABC', 'ABC');1342addThis();1343status = inSection(206);1344pattern = /([a-c]*)\1/i;1345string = 'ABCABC';1346actualmatch = string.match(pattern);1347expectedmatch = Array('ABCABC', 'ABC');1348addThis();1349status = inSection(207);1350pattern = /a(?!b)./;1351string = 'abad';1352actualmatch = string.match(pattern);1353expectedmatch = Array('ad');1354addThis();1355status = inSection(208);1356pattern = /a(?=d)./;1357string = 'abad';1358actualmatch = string.match(pattern);1359expectedmatch = Array('ad');1360addThis();1361status = inSection(209);1362pattern = /a(?=c|d)./;1363string = 'abad';1364actualmatch = string.match(pattern);1365expectedmatch = Array('ad');1366addThis();1367status = inSection(210);1368pattern = /a(?:b|c|d)(.)/;1369string = 'ace';1370actualmatch = string.match(pattern);1371expectedmatch = Array('ace', 'e');1372addThis();1373status = inSection(211);1374pattern = /a(?:b|c|d)*(.)/;1375string = 'ace';1376actualmatch = string.match(pattern);1377expectedmatch = Array('ace', 'e');1378addThis();1379status = inSection(212);1380pattern = /a(?:b|c|d)+?(.)/;1381string = 'ace';1382actualmatch = string.match(pattern);1383expectedmatch = Array('ace', 'e');1384addThis();1385status = inSection(213);1386pattern = /a(?:b|c|d)+?(.)/;1387string = 'acdbcdbe';1388actualmatch = string.match(pattern);1389expectedmatch = Array('acd', 'd');1390addThis();1391status = inSection(214);1392pattern = /a(?:b|c|d)+(.)/;1393string = 'acdbcdbe';1394actualmatch = string.match(pattern);1395expectedmatch = Array('acdbcdbe', 'e');1396addThis();1397status = inSection(215);1398pattern = /a(?:b|c|d){2}(.)/;1399string = 'acdbcdbe';1400actualmatch = string.match(pattern);1401expectedmatch = Array('acdb', 'b');1402addThis();1403status = inSection(216);1404pattern = /a(?:b|c|d){4,5}(.)/;1405string = 'acdbcdbe';1406actualmatch = string.match(pattern);1407expectedmatch = Array('acdbcdb', 'b');1408addThis();1409status = inSection(217);1410pattern = /a(?:b|c|d){4,5}?(.)/;1411string = 'acdbcdbe';1412actualmatch = string.match(pattern);1413expectedmatch = Array('acdbcd', 'd');1414addThis();1415// MODIFIED - ECMA has different rules for paren contents1416status = inSection(218);1417pattern = /((foo)|(bar))*/;1418string = 'foobar';1419actualmatch = string.match(pattern);1420//expectedmatch = Array('foobar', 'bar', 'foo', 'bar');1421expectedmatch = Array('foobar', 'bar', undefined, 'bar');1422addThis();1423status = inSection(219);1424pattern = /a(?:b|c|d){6,7}(.)/;1425string = 'acdbcdbe';1426actualmatch = string.match(pattern);1427expectedmatch = Array('acdbcdbe', 'e');1428addThis();1429status = inSection(220);1430pattern = /a(?:b|c|d){6,7}?(.)/;1431string = 'acdbcdbe';1432actualmatch = string.match(pattern);1433expectedmatch = Array('acdbcdbe', 'e');1434addThis();1435status = inSection(221);1436pattern = /a(?:b|c|d){5,6}(.)/;1437string = 'acdbcdbe';1438actualmatch = string.match(pattern);1439expectedmatch = Array('acdbcdbe', 'e');1440addThis();1441status = inSection(222);1442pattern = /a(?:b|c|d){5,6}?(.)/;1443string = 'acdbcdbe';1444actualmatch = string.match(pattern);1445expectedmatch = Array('acdbcdb', 'b');1446addThis();1447status = inSection(223);1448pattern = /a(?:b|c|d){5,7}(.)/;1449string = 'acdbcdbe';1450actualmatch = string.match(pattern);1451expectedmatch = Array('acdbcdbe', 'e');1452addThis();1453status = inSection(224);1454pattern = /a(?:b|c|d){5,7}?(.)/;1455string = 'acdbcdbe';1456actualmatch = string.match(pattern);1457expectedmatch = Array('acdbcdb', 'b');1458addThis();1459status = inSection(225);1460pattern = /a(?:b|(c|e){1,2}?|d)+?(.)/;1461string = 'ace';1462actualmatch = string.match(pattern);1463expectedmatch = Array('ace', 'c', 'e');1464addThis();1465status = inSection(226);1466pattern = /^(.+)?B/;1467string = 'AB';1468actualmatch = string.match(pattern);1469expectedmatch = Array('AB', 'A');1470addThis();1471/* MODIFIED - ECMA has different rules for paren contents */1472status = inSection(227);1473pattern = /^([^a-z])|(\^)$/;1474string = '.';1475actualmatch = string.match(pattern);1476//expectedmatch = Array('.', '.', '');1477expectedmatch = Array('.', '.', undefined);1478addThis();1479status = inSection(228);1480pattern = /^[<>]&/;1481string = '<&OUT';1482actualmatch = string.match(pattern);1483expectedmatch = Array('<&');1484addThis();1485/* Can't refer to a capture before it's encountered & completed1486 status = inSection(229);1487 pattern = /^(a\1?){4}$/;1488 string = 'aaaaaaaaaa';1489 actualmatch = string.match(pattern);1490 expectedmatch = Array('aaaaaaaaaa', 'aaaa');1491 addThis();1492 status = inSection(230);1493 pattern = /^(a(?(1)\1)){4}$/;1494 string = 'aaaaaaaaaa';1495 actualmatch = string.match(pattern);1496 expectedmatch = Array('aaaaaaaaaa', 'aaaa');1497 addThis();1498*/1499status = inSection(231);1500pattern = /((a{4})+)/;1501string = 'aaaaaaaaa';1502actualmatch = string.match(pattern);1503expectedmatch = Array('aaaaaaaa', 'aaaaaaaa', 'aaaa');1504addThis();1505status = inSection(232);1506pattern = /(((aa){2})+)/;1507string = 'aaaaaaaaaa';1508actualmatch = string.match(pattern);1509expectedmatch = Array('aaaaaaaa', 'aaaaaaaa', 'aaaa', 'aa');1510addThis();1511status = inSection(233);1512pattern = /(((a{2}){2})+)/;1513string = 'aaaaaaaaaa';1514actualmatch = string.match(pattern);1515expectedmatch = Array('aaaaaaaa', 'aaaaaaaa', 'aaaa', 'aa');1516addThis();1517status = inSection(234);1518pattern = /(?:(f)(o)(o)|(b)(a)(r))*/;1519string = 'foobar';1520actualmatch = string.match(pattern);1521//expectedmatch = Array('foobar', 'f', 'o', 'o', 'b', 'a', 'r');1522expectedmatch = Array('foobar', undefined, undefined, undefined, 'b', 'a', 'r');1523addThis();1524/* ECMA supports (?: (?= and (?! but doesn't support (?< etc.1525 status = inSection(235);1526 pattern = /(?<=a)b/;1527 string = 'ab';1528 actualmatch = string.match(pattern);1529 expectedmatch = Array('b');1530 addThis();1531 status = inSection(236);1532 pattern = /(?<!c)b/;1533 string = 'ab';1534 actualmatch = string.match(pattern);1535 expectedmatch = Array('b');1536 addThis();1537 status = inSection(237);1538 pattern = /(?<!c)b/;1539 string = 'b';1540 actualmatch = string.match(pattern);1541 expectedmatch = Array('b');1542 addThis();1543 status = inSection(238);1544 pattern = /(?<!c)b/;1545 string = 'b';1546 actualmatch = string.match(pattern);1547 expectedmatch = Array('b');1548 addThis();1549*/1550status = inSection(239);1551pattern = /(?:..)*a/;1552string = 'aba';1553actualmatch = string.match(pattern);1554expectedmatch = Array('aba');1555addThis();1556status = inSection(240);1557pattern = /(?:..)*?a/;1558string = 'aba';1559actualmatch = string.match(pattern);1560expectedmatch = Array('a');1561addThis();1562/*1563 * MODIFIED - ECMA has different rules for paren contents. Note1564 * this regexp has two non-capturing parens, and one capturing1565 *1566 * The issue: shouldn't the match be ['ab', undefined]? Because the1567 * '\1' matches the undefined value of the second iteration of the '*'1568 * (in which the 'b' part of the '|' matches). But Perl wants ['ab','b'].1569 *1570 * Answer: waldemar@netscape.com:1571 *1572 * The correct answer is ['ab', undefined]. Perl doesn't match1573 * ECMAScript here, and I'd say that Perl is wrong in this case.1574 */1575status = inSection(241);1576pattern = /^(?:b|a(?=(.)))*\1/;1577string = 'abc';1578actualmatch = string.match(pattern);1579//expectedmatch = Array('ab', 'b');1580expectedmatch = Array('ab', undefined);1581addThis();1582status = inSection(242);1583pattern = /^(){3,5}/;1584string = 'abc';1585actualmatch = string.match(pattern);1586expectedmatch = Array('', '');1587addThis();1588status = inSection(243);1589pattern = /^(a+)*ax/;1590string = 'aax';1591actualmatch = string.match(pattern);1592expectedmatch = Array('aax', 'a');1593addThis();1594status = inSection(244);1595pattern = /^((a|b)+)*ax/;1596string = 'aax';1597actualmatch = string.match(pattern);1598expectedmatch = Array('aax', 'a', 'a');1599addThis();1600status = inSection(245);1601pattern = /^((a|bc)+)*ax/;1602string = 'aax';1603actualmatch = string.match(pattern);1604expectedmatch = Array('aax', 'a', 'a');1605addThis();1606/* MODIFIED - ECMA has different rules for paren contents */1607status = inSection(246);1608pattern = /(a|x)*ab/;1609string = 'cab';1610actualmatch = string.match(pattern);1611//expectedmatch = Array('ab', '');1612expectedmatch = Array('ab', undefined);1613addThis();1614status = inSection(247);1615pattern = /(a)*ab/;1616string = 'cab';1617actualmatch = string.match(pattern);1618expectedmatch = Array('ab', undefined);1619addThis();1620/* ECMA doesn't support (?imsx or (?-imsx1621 status = inSection(248);1622 pattern = /(?:(?i)a)b/;1623 string = 'ab';1624 actualmatch = string.match(pattern);1625 expectedmatch = Array('ab');1626 addThis();1627 status = inSection(249);1628 pattern = /((?i)a)b/;1629 string = 'ab';1630 actualmatch = string.match(pattern);1631 expectedmatch = Array('ab', 'a');1632 addThis();1633 status = inSection(250);1634 pattern = /(?:(?i)a)b/;1635 string = 'Ab';1636 actualmatch = string.match(pattern);1637 expectedmatch = Array('Ab');1638 addThis();1639 status = inSection(251);1640 pattern = /((?i)a)b/;1641 string = 'Ab';1642 actualmatch = string.match(pattern);1643 expectedmatch = Array('Ab', 'A');1644 addThis();1645 status = inSection(252);1646 pattern = /(?i:a)b/;1647 string = 'ab';1648 actualmatch = string.match(pattern);1649 expectedmatch = Array('ab');1650 addThis();1651 status = inSection(253);1652 pattern = /((?i:a))b/;1653 string = 'ab';1654 actualmatch = string.match(pattern);1655 expectedmatch = Array('ab', 'a');1656 addThis();1657 status = inSection(254);1658 pattern = /(?i:a)b/;1659 string = 'Ab';1660 actualmatch = string.match(pattern);1661 expectedmatch = Array('Ab');1662 addThis();1663 status = inSection(255);1664 pattern = /((?i:a))b/;1665 string = 'Ab';1666 actualmatch = string.match(pattern);1667 expectedmatch = Array('Ab', 'A');1668 addThis();1669 status = inSection(256);1670 pattern = /(?:(?-i)a)b/i;1671 string = 'ab';1672 actualmatch = string.match(pattern);1673 expectedmatch = Array('ab');1674 addThis();1675 status = inSection(257);1676 pattern = /((?-i)a)b/i;1677 string = 'ab';1678 actualmatch = string.match(pattern);1679 expectedmatch = Array('ab', 'a');1680 addThis();1681 status = inSection(258);1682 pattern = /(?:(?-i)a)b/i;1683 string = 'aB';1684 actualmatch = string.match(pattern);1685 expectedmatch = Array('aB');1686 addThis();1687 status = inSection(259);1688 pattern = /((?-i)a)b/i;1689 string = 'aB';1690 actualmatch = string.match(pattern);1691 expectedmatch = Array('aB', 'a');1692 addThis();1693 status = inSection(260);1694 pattern = /(?:(?-i)a)b/i;1695 string = 'aB';1696 actualmatch = string.match(pattern);1697 expectedmatch = Array('aB');1698 addThis();1699 status = inSection(261);1700 pattern = /((?-i)a)b/i;1701 string = 'aB';1702 actualmatch = string.match(pattern);1703 expectedmatch = Array('aB', 'a');1704 addThis();1705 status = inSection(262);1706 pattern = /(?-i:a)b/i;1707 string = 'ab';1708 actualmatch = string.match(pattern);1709 expectedmatch = Array('ab');1710 addThis();1711 status = inSection(263);1712 pattern = /((?-i:a))b/i;1713 string = 'ab';1714 actualmatch = string.match(pattern);1715 expectedmatch = Array('ab', 'a');1716 addThis();1717 status = inSection(264);1718 pattern = /(?-i:a)b/i;1719 string = 'aB';1720 actualmatch = string.match(pattern);1721 expectedmatch = Array('aB');1722 addThis();1723 status = inSection(265);1724 pattern = /((?-i:a))b/i;1725 string = 'aB';1726 actualmatch = string.match(pattern);1727 expectedmatch = Array('aB', 'a');1728 addThis();1729 status = inSection(266);1730 pattern = /(?-i:a)b/i;1731 string = 'aB';1732 actualmatch = string.match(pattern);1733 expectedmatch = Array('aB');1734 addThis();1735 status = inSection(267);1736 pattern = /((?-i:a))b/i;1737 string = 'aB';1738 actualmatch = string.match(pattern);1739 expectedmatch = Array('aB', 'a');1740 addThis();1741 status = inSection(268);1742 pattern = /((?s-i:a.))b/i;1743 string = 'a\nB';1744 actualmatch = string.match(pattern);1745 expectedmatch = Array('a\nB', 'a\n');1746 addThis();1747*/1748status = inSection(269);1749pattern = /(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))/;1750string = 'cabbbb';1751actualmatch = string.match(pattern);1752expectedmatch = Array('cabbbb');1753addThis();1754status = inSection(270);1755pattern = /(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))/;1756string = 'caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb';1757actualmatch = string.match(pattern);1758expectedmatch = Array('caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb');1759addThis();1760status = inSection(271);1761pattern = /(ab)\d\1/i;1762string = 'Ab4ab';1763actualmatch = string.match(pattern);1764expectedmatch = Array('Ab4ab', 'Ab');1765addThis();1766status = inSection(272);1767pattern = /(ab)\d\1/i;1768string = 'ab4Ab';1769actualmatch = string.match(pattern);1770expectedmatch = Array('ab4Ab', 'ab');1771addThis();1772status = inSection(273);1773pattern = /foo\w*\d{4}baz/;1774string = 'foobar1234baz';1775actualmatch = string.match(pattern);1776expectedmatch = Array('foobar1234baz');1777addThis();1778status = inSection(274);1779pattern = /x(~~)*(?:(?:F)?)?/;1780string = 'x~~';1781actualmatch = string.match(pattern);1782expectedmatch = Array('x~~', '~~');1783addThis();1784/* Perl supports (?# but JS doesn't1785 status = inSection(275);1786 pattern = /^a(?#xxx){3}c/;1787 string = 'aaac';1788 actualmatch = string.match(pattern);1789 expectedmatch = Array('aaac');1790 addThis();1791*/1792/* ECMA doesn't support (?< etc1793 status = inSection(276);1794 pattern = /(?<![cd])[ab]/;1795 string = 'dbaacb';1796 actualmatch = string.match(pattern);1797 expectedmatch = Array('a');1798 addThis();1799 status = inSection(277);1800 pattern = /(?<!(c|d))[ab]/;1801 string = 'dbaacb';1802 actualmatch = string.match(pattern);1803 expectedmatch = Array('a');1804 addThis();1805 status = inSection(278);1806 pattern = /(?<!cd)[ab]/;1807 string = 'cdaccb';1808 actualmatch = string.match(pattern);1809 expectedmatch = Array('b');1810 addThis();1811 status = inSection(279);1812 pattern = /((?s)^a(.))((?m)^b$)/;1813 string = 'a\nb\nc\n';1814 actualmatch = string.match(pattern);1815 expectedmatch = Array('a\nb', 'a\n', '\n', 'b');1816 addThis();1817 status = inSection(280);1818 pattern = /((?m)^b$)/;1819 string = 'a\nb\nc\n';1820 actualmatch = string.match(pattern);1821 expectedmatch = Array('b', 'b');1822 addThis();1823 status = inSection(281);1824 pattern = /(?m)^b/;1825 string = 'a\nb\n';1826 actualmatch = string.match(pattern);1827 expectedmatch = Array('b');1828 addThis();1829 status = inSection(282);1830 pattern = /(?m)^(b)/;1831 string = 'a\nb\n';1832 actualmatch = string.match(pattern);1833 expectedmatch = Array('b', 'b');1834 addThis();1835 status = inSection(283);1836 pattern = /((?m)^b)/;1837 string = 'a\nb\n';1838 actualmatch = string.match(pattern);1839 expectedmatch = Array('b', 'b');1840 addThis();1841 status = inSection(284);1842 pattern = /\n((?m)^b)/;1843 string = 'a\nb\n';1844 actualmatch = string.match(pattern);1845 expectedmatch = Array('\nb', 'b');1846 addThis();1847 status = inSection(285);1848 pattern = /((?s).)c(?!.)/;1849 string = 'a\nb\nc\n';1850 actualmatch = string.match(pattern);1851 expectedmatch = Array('\nc', '\n');1852 addThis();1853 status = inSection(286);1854 pattern = /((?s).)c(?!.)/;1855 string = 'a\nb\nc\n';1856 actualmatch = string.match(pattern);1857 expectedmatch = Array('\nc', '\n');1858 addThis();1859 status = inSection(287);1860 pattern = /((?s)b.)c(?!.)/;1861 string = 'a\nb\nc\n';1862 actualmatch = string.match(pattern);1863 expectedmatch = Array('b\nc', 'b\n');1864 addThis();1865 status = inSection(288);1866 pattern = /((?s)b.)c(?!.)/;1867 string = 'a\nb\nc\n';1868 actualmatch = string.match(pattern);1869 expectedmatch = Array('b\nc', 'b\n');1870 addThis();1871 status = inSection(289);1872 pattern = /((?m)^b)/;1873 string = 'a\nb\nc\n';1874 actualmatch = string.match(pattern);1875 expectedmatch = Array('b', 'b');1876 addThis();1877*/1878/* ECMA doesn't support (?(condition)1879 status = inSection(290);1880 pattern = /(?(1)b|a)/;1881 string = 'a';1882 actualmatch = string.match(pattern);1883 expectedmatch = Array('a');1884 addThis();1885 status = inSection(291);1886 pattern = /(x)?(?(1)b|a)/;1887 string = 'a';1888 actualmatch = string.match(pattern);1889 expectedmatch = Array('a');1890 addThis();1891 status = inSection(292);1892 pattern = /()?(?(1)b|a)/;1893 string = 'a';1894 actualmatch = string.match(pattern);1895 expectedmatch = Array('a');1896 addThis();1897 status = inSection(293);1898 pattern = /()?(?(1)a|b)/;1899 string = 'a';1900 actualmatch = string.match(pattern);1901 expectedmatch = Array('a');1902 addThis();1903 status = inSection(294);1904 pattern = /^(\()?blah(?(1)(\)))$/;1905 string = '(blah)';1906 actualmatch = string.match(pattern);1907 expectedmatch = Array('(blah)', '(', ')');1908 addThis();1909 status = inSection(295);1910 pattern = /^(\()?blah(?(1)(\)))$/;1911 string = 'blah';1912 actualmatch = string.match(pattern);1913 expectedmatch = Array('blah');1914 addThis();1915 status = inSection(296);1916 pattern = /^(\(+)?blah(?(1)(\)))$/;1917 string = '(blah)';1918 actualmatch = string.match(pattern);1919 expectedmatch = Array('(blah)', '(', ')');1920 addThis();1921 status = inSection(297);1922 pattern = /^(\(+)?blah(?(1)(\)))$/;1923 string = 'blah';1924 actualmatch = string.match(pattern);1925 expectedmatch = Array('blah');1926 addThis();1927 status = inSection(298);1928 pattern = /(?(?!a)b|a)/;1929 string = 'a';1930 actualmatch = string.match(pattern);1931 expectedmatch = Array('a');1932 addThis();1933 status = inSection(299);1934 pattern = /(?(?=a)a|b)/;1935 string = 'a';1936 actualmatch = string.match(pattern);1937 expectedmatch = Array('a');1938 addThis();1939*/1940status = inSection(300);1941pattern = /(?=(a+?))(\1ab)/;1942string = 'aaab';1943actualmatch = string.match(pattern);1944expectedmatch = Array('aab', 'a', 'aab');1945addThis();1946status = inSection(301);1947pattern = /(\w+:)+/;1948string = 'one:';1949actualmatch = string.match(pattern);1950expectedmatch = Array('one:', 'one:');1951addThis();1952/* ECMA doesn't support (?< etc1953 status = inSection(302);1954 pattern = /$(?<=^(a))/;1955 string = 'a';1956 actualmatch = string.match(pattern);1957 expectedmatch = Array('', 'a');1958 addThis();1959*/1960status = inSection(303);1961pattern = /(?=(a+?))(\1ab)/;1962string = 'aaab';1963actualmatch = string.match(pattern);1964expectedmatch = Array('aab', 'a', 'aab');1965addThis();1966/* MODIFIED - ECMA has different rules for paren contents */1967status = inSection(304);1968pattern = /([\w:]+::)?(\w+)$/;1969string = 'abcd';1970actualmatch = string.match(pattern);1971//expectedmatch = Array('abcd', '', 'abcd');1972expectedmatch = Array('abcd', undefined, 'abcd');1973addThis();1974status = inSection(305);1975pattern = /([\w:]+::)?(\w+)$/;1976string = 'xy:z:::abcd';1977actualmatch = string.match(pattern);1978expectedmatch = Array('xy:z:::abcd', 'xy:z:::', 'abcd');1979addThis();1980status = inSection(306);1981pattern = /^[^bcd]*(c+)/;1982string = 'aexycd';1983actualmatch = string.match(pattern);1984expectedmatch = Array('aexyc', 'c');1985addThis();1986status = inSection(307);1987pattern = /(a*)b+/;1988string = 'caab';1989actualmatch = string.match(pattern);1990expectedmatch = Array('aab', 'aa');1991addThis();1992/* MODIFIED - ECMA has different rules for paren contents */1993status = inSection(308);1994pattern = /([\w:]+::)?(\w+)$/;1995string = 'abcd';1996actualmatch = string.match(pattern);1997//expectedmatch = Array('abcd', '', 'abcd');1998expectedmatch = Array('abcd', undefined, 'abcd');1999addThis();2000status = inSection(309);2001pattern = /([\w:]+::)?(\w+)$/;2002string = 'xy:z:::abcd';2003actualmatch = string.match(pattern);2004expectedmatch = Array('xy:z:::abcd', 'xy:z:::', 'abcd');2005addThis();2006status = inSection(310);2007pattern = /^[^bcd]*(c+)/;2008string = 'aexycd';2009actualmatch = string.match(pattern);2010expectedmatch = Array('aexyc', 'c');2011addThis();2012/* ECMA doesn't support (?>2013 status = inSection(311);2014 pattern = /(?>a+)b/;2015 string = 'aaab';2016 actualmatch = string.match(pattern);2017 expectedmatch = Array('aaab');2018 addThis();2019*/2020status = inSection(312);2021pattern = /([[:]+)/;2022 string = 'a:[b]:';2023 actualmatch = string.match(pattern);2024 expectedmatch = Array(':[', ':[');2025 addThis();2026 status = inSection(313);2027 pattern = /([[=]+)/;2028 string = 'a=[b]=';2029 actualmatch = string.match(pattern);2030 expectedmatch = Array('=[', '=[');2031 addThis();2032 status = inSection(314);2033 pattern = /([[.]+)/;2034 string = 'a.[b].';2035 actualmatch = string.match(pattern);2036 expectedmatch = Array('.[', '.[');2037 addThis();2038/* ECMA doesn't have rules for [:2039 status = inSection(315);2040 pattern = /[a[:]b[:c]/;2041 string = 'abc';2042 actualmatch = string.match(pattern);2043 expectedmatch = Array('abc');2044 addThis();2045*/2046/* ECMA doesn't support (?>2047 status = inSection(316);2048 pattern = /((?>a+)b)/;2049 string = 'aaab';2050 actualmatch = string.match(pattern);2051 expectedmatch = Array('aaab', 'aaab');2052 addThis();2053 status = inSection(317);2054 pattern = /(?>(a+))b/;2055 string = 'aaab';2056 actualmatch = string.match(pattern);2057 expectedmatch = Array('aaab', 'aaa');2058 addThis();2059 status = inSection(318);2060 pattern = /((?>[^()]+)|\([^()]*\))+/;2061 string = '((abc(ade)ufh()()x';2062 actualmatch = string.match(pattern);2063 expectedmatch = Array('abc(ade)ufh()()x', 'x');2064 addThis();2065*/2066/* Perl has \Z has end-of-line, ECMA doesn't2067 status = inSection(319);2068 pattern = /\Z/;2069 string = 'a\nb\n';2070 actualmatch = string.match(pattern);2071 expectedmatch = Array('');2072 addThis();2073 status = inSection(320);2074 pattern = /\z/;2075 string = 'a\nb\n';2076 actualmatch = string.match(pattern);2077 expectedmatch = Array('');2078 addThis();2079*/2080 status = inSection(321);2081 pattern = /$/;2082 string = 'a\nb\n';2083 actualmatch = string.match(pattern);2084 expectedmatch = Array('');2085 addThis();2086/* Perl has \Z has end-of-line, ECMA doesn't2087 status = inSection(322);2088 pattern = /\Z/;2089 string = 'b\na\n';2090 actualmatch = string.match(pattern);2091 expectedmatch = Array('');2092 addThis();2093 status = inSection(323);2094 pattern = /\z/;2095 string = 'b\na\n';2096 actualmatch = string.match(pattern);2097 expectedmatch = Array('');2098 addThis();2099*/2100 status = inSection(324);2101 pattern = /$/;2102 string = 'b\na\n';2103 actualmatch = string.match(pattern);2104 expectedmatch = Array('');2105 addThis();2106/* Perl has \Z has end-of-line, ECMA doesn't2107 status = inSection(325);2108 pattern = /\Z/;2109 string = 'b\na';2110 actualmatch = string.match(pattern);2111 expectedmatch = Array('');2112 addThis();2113 status = inSection(326);2114 pattern = /\z/;2115 string = 'b\na';2116 actualmatch = string.match(pattern);2117 expectedmatch = Array('');2118 addThis();2119*/2120 status = inSection(327);2121 pattern = /$/;2122 string = 'b\na';2123 actualmatch = string.match(pattern);2124 expectedmatch = Array('');2125 addThis();2126/* Perl has \Z has end-of-line, ECMA doesn't2127 status = inSection(328);2128 pattern = /\Z/m;2129 string = 'a\nb\n';2130 actualmatch = string.match(pattern);2131 expectedmatch = Array('');2132 addThis();2133 status = inSection(329);2134 pattern = /\z/m;2135 string = 'a\nb\n';2136 actualmatch = string.match(pattern);2137 expectedmatch = Array('');2138 addThis();2139*/2140 status = inSection(330);2141 pattern = /$/m;2142 string = 'a\nb\n';2143 actualmatch = string.match(pattern);2144 expectedmatch = Array('');2145 addThis();2146/* Perl has \Z has end-of-line, ECMA doesn't2147 status = inSection(331);2148 pattern = /\Z/m;2149 string = 'b\na\n';2150 actualmatch = string.match(pattern);2151 expectedmatch = Array('');2152 addThis();2153 status = inSection(332);2154 pattern = /\z/m;2155 string = 'b\na\n';2156 actualmatch = string.match(pattern);2157 expectedmatch = Array('');2158 addThis();2159*/2160 status = inSection(333);2161 pattern = /$/m;2162 string = 'b\na\n';2163 actualmatch = string.match(pattern);2164 expectedmatch = Array('');2165 addThis();2166/* Perl has \Z has end-of-line, ECMA doesn't2167 status = inSection(334);2168 pattern = /\Z/m;2169 string = 'b\na';2170 actualmatch = string.match(pattern);2171 expectedmatch = Array('');2172 addThis();2173 status = inSection(335);2174 pattern = /\z/m;2175 string = 'b\na';2176 actualmatch = string.match(pattern);2177 expectedmatch = Array('');2178 addThis();2179*/2180 status = inSection(336);2181 pattern = /$/m;2182 string = 'b\na';2183 actualmatch = string.match(pattern);2184 expectedmatch = Array('');2185 addThis();2186/* Perl has \Z has end-of-line, ECMA doesn't2187 status = inSection(337);2188 pattern = /a\Z/;2189 string = 'b\na\n';2190 actualmatch = string.match(pattern);2191 expectedmatch = Array('a');2192 addThis();2193*/2194/* $ only matches end of input unless multiline2195 status = inSection(338);2196 pattern = /a$/;2197 string = 'b\na\n';2198 actualmatch = string.match(pattern);2199 expectedmatch = Array('a');2200 addThis();2201*/2202/* Perl has \Z has end-of-line, ECMA doesn't2203 status = inSection(339);2204 pattern = /a\Z/;2205 string = 'b\na';2206 actualmatch = string.match(pattern);2207 expectedmatch = Array('a');2208 addThis();2209 status = inSection(340);2210 pattern = /a\z/;2211 string = 'b\na';2212 actualmatch = string.match(pattern);2213 expectedmatch = Array('a');2214 addThis();2215*/2216 status = inSection(341);2217 pattern = /a$/;2218 string = 'b\na';2219 actualmatch = string.match(pattern);2220 expectedmatch = Array('a');2221 addThis();2222 status = inSection(342);2223 pattern = /a$/m;2224 string = 'a\nb\n';2225 actualmatch = string.match(pattern);2226 expectedmatch = Array('a');2227 addThis();2228/* Perl has \Z has end-of-line, ECMA doesn't2229 status = inSection(343);2230 pattern = /a\Z/m;2231 string = 'b\na\n';2232 actualmatch = string.match(pattern);2233 expectedmatch = Array('a');2234 addThis();2235*/2236 status = inSection(344);2237 pattern = /a$/m;2238 string = 'b\na\n';2239 actualmatch = string.match(pattern);2240 expectedmatch = Array('a');2241 addThis();2242/* Perl has \Z has end-of-line, ECMA doesn't2243 status = inSection(345);2244 pattern = /a\Z/m;2245 string = 'b\na';2246 actualmatch = string.match(pattern);2247 expectedmatch = Array('a');2248 addThis();2249 status = inSection(346);2250 pattern = /a\z/m;2251 string = 'b\na';2252 actualmatch = string.match(pattern);2253 expectedmatch = Array('a');2254 addThis();2255*/2256 status = inSection(347);2257 pattern = /a$/m;2258 string = 'b\na';2259 actualmatch = string.match(pattern);2260 expectedmatch = Array('a');2261 addThis();2262/* Perl has \Z has end-of-line, ECMA doesn't2263 status = inSection(348);2264 pattern = /aa\Z/;2265 string = 'b\naa\n';2266 actualmatch = string.match(pattern);2267 expectedmatch = Array('aa');2268 addThis();2269*/2270/* $ only matches end of input unless multiline2271 status = inSection(349);2272 pattern = /aa$/;2273 string = 'b\naa\n';2274 actualmatch = string.match(pattern);2275 expectedmatch = Array('aa');2276 addThis();2277*/2278/* Perl has \Z has end-of-line, ECMA doesn't2279 status = inSection(350);2280 pattern = /aa\Z/;2281 string = 'b\naa';2282 actualmatch = string.match(pattern);2283 expectedmatch = Array('aa');2284 addThis();2285 status = inSection(351);2286 pattern = /aa\z/;2287 string = 'b\naa';2288 actualmatch = string.match(pattern);2289 expectedmatch = Array('aa');2290 addThis();2291*/2292 status = inSection(352);2293 pattern = /aa$/;2294 string = 'b\naa';2295 actualmatch = string.match(pattern);2296 expectedmatch = Array('aa');2297 addThis();2298 status = inSection(353);2299 pattern = /aa$/m;2300 string = 'aa\nb\n';2301 actualmatch = string.match(pattern);2302 expectedmatch = Array('aa');2303 addThis();2304/* Perl has \Z has end-of-line, ECMA doesn't2305 status = inSection(354);2306 pattern = /aa\Z/m;2307 string = 'b\naa\n';2308 actualmatch = string.match(pattern);2309 expectedmatch = Array('aa');2310 addThis();2311*/2312 status = inSection(355);2313 pattern = /aa$/m;2314 string = 'b\naa\n';2315 actualmatch = string.match(pattern);2316 expectedmatch = Array('aa');2317 addThis();2318/* Perl has \Z has end-of-line, ECMA doesn't2319 status = inSection(356);2320 pattern = /aa\Z/m;2321 string = 'b\naa';2322 actualmatch = string.match(pattern);2323 expectedmatch = Array('aa');2324 addThis();2325 status = inSection(357);2326 pattern = /aa\z/m;2327 string = 'b\naa';2328 actualmatch = string.match(pattern);2329 expectedmatch = Array('aa');2330 addThis();2331*/2332 status = inSection(358);2333 pattern = /aa$/m;2334 string = 'b\naa';2335 actualmatch = string.match(pattern);2336 expectedmatch = Array('aa');2337 addThis();2338/* Perl has \Z has end-of-line, ECMA doesn't2339 status = inSection(359);2340 pattern = /ab\Z/;2341 string = 'b\nab\n';2342 actualmatch = string.match(pattern);2343 expectedmatch = Array('ab');2344 addThis();2345*/2346/* $ only matches end of input unless multiline2347 status = inSection(360);2348 pattern = /ab$/;2349 string = 'b\nab\n';2350 actualmatch = string.match(pattern);2351 expectedmatch = Array('ab');2352 addThis();2353*/2354/* Perl has \Z has end-of-line, ECMA doesn't2355 status = inSection(361);2356 pattern = /ab\Z/;2357 string = 'b\nab';2358 actualmatch = string.match(pattern);2359 expectedmatch = Array('ab');2360 addThis();2361 status = inSection(362);2362 pattern = /ab\z/;2363 string = 'b\nab';2364 actualmatch = string.match(pattern);2365 expectedmatch = Array('ab');2366 addThis();2367*/2368 status = inSection(363);2369 pattern = /ab$/;2370 string = 'b\nab';2371 actualmatch = string.match(pattern);2372 expectedmatch = Array('ab');2373 addThis();2374 status = inSection(364);2375 pattern = /ab$/m;2376 string = 'ab\nb\n';2377 actualmatch = string.match(pattern);2378 expectedmatch = Array('ab');2379 addThis();2380/* Perl has \Z has end-of-line, ECMA doesn't2381 status = inSection(365);2382 pattern = /ab\Z/m;2383 string = 'b\nab\n';2384 actualmatch = string.match(pattern);2385 expectedmatch = Array('ab');2386 addThis();2387*/2388 status = inSection(366);2389 pattern = /ab$/m;2390 string = 'b\nab\n';2391 actualmatch = string.match(pattern);2392 expectedmatch = Array('ab');2393 addThis();2394/* Perl has \Z has end-of-line, ECMA doesn't2395 status = inSection(367);2396 pattern = /ab\Z/m;2397 string = 'b\nab';2398 actualmatch = string.match(pattern);2399 expectedmatch = Array('ab');2400 addThis();2401 status = inSection(368);2402 pattern = /ab\z/m;2403 string = 'b\nab';2404 actualmatch = string.match(pattern);2405 expectedmatch = Array('ab');2406 addThis();2407*/2408 status = inSection(369);2409 pattern = /ab$/m;2410 string = 'b\nab';2411 actualmatch = string.match(pattern);2412 expectedmatch = Array('ab');2413 addThis();2414/* Perl has \Z has end-of-line, ECMA doesn't2415 status = inSection(370);2416 pattern = /abb\Z/;2417 string = 'b\nabb\n';2418 actualmatch = string.match(pattern);2419 expectedmatch = Array('abb');2420 addThis();2421*/2422/* $ only matches end of input unless multiline2423 status = inSection(371);2424 pattern = /abb$/;2425 string = 'b\nabb\n';2426 actualmatch = string.match(pattern);2427 expectedmatch = Array('abb');2428 addThis();2429*/2430/* Perl has \Z has end-of-line, ECMA doesn't2431 status = inSection(372);2432 pattern = /abb\Z/;2433 string = 'b\nabb';2434 actualmatch = string.match(pattern);2435 expectedmatch = Array('abb');2436 addThis();2437 status = inSection(373);2438 pattern = /abb\z/;2439 string = 'b\nabb';2440 actualmatch = string.match(pattern);2441 expectedmatch = Array('abb');2442 addThis();2443*/2444 status = inSection(374);2445 pattern = /abb$/;2446 string = 'b\nabb';2447 actualmatch = string.match(pattern);2448 expectedmatch = Array('abb');2449 addThis();2450 status = inSection(375);2451 pattern = /abb$/m;2452 string = 'abb\nb\n';2453 actualmatch = string.match(pattern);2454 expectedmatch = Array('abb');2455 addThis();2456/* Perl has \Z has end-of-line, ECMA doesn't2457 status = inSection(376);2458 pattern = /abb\Z/m;2459 string = 'b\nabb\n';2460 actualmatch = string.match(pattern);2461 expectedmatch = Array('abb');2462 addThis();2463*/2464 status = inSection(377);2465 pattern = /abb$/m;2466 string = 'b\nabb\n';2467 actualmatch = string.match(pattern);2468 expectedmatch = Array('abb');2469 addThis();2470/* Perl has \Z has end-of-line, ECMA doesn't2471 status = inSection(378);2472 pattern = /abb\Z/m;2473 string = 'b\nabb';2474 actualmatch = string.match(pattern);2475 expectedmatch = Array('abb');2476 addThis();2477 status = inSection(379);2478 pattern = /abb\z/m;2479 string = 'b\nabb';2480 actualmatch = string.match(pattern);2481 expectedmatch = Array('abb');2482 addThis();2483*/2484 status = inSection(380);2485 pattern = /abb$/m;2486 string = 'b\nabb';2487 actualmatch = string.match(pattern);2488 expectedmatch = Array('abb');2489 addThis();2490 status = inSection(381);2491 pattern = /(^|x)(c)/;2492 string = 'ca';2493 actualmatch = string.match(pattern);2494 expectedmatch = Array('c', '', 'c');2495 addThis();2496 status = inSection(382);2497 pattern = /foo.bart/;2498 string = 'foo.bart';2499 actualmatch = string.match(pattern);2500 expectedmatch = Array('foo.bart');2501 addThis();2502 status = inSection(383);2503 pattern = /^d[x][x][x]/m;2504 string = 'abcd\ndxxx';2505 actualmatch = string.match(pattern);2506 expectedmatch = Array('dxxx');2507 addThis();2508 status = inSection(384);2509 pattern = /tt+$/;2510 string = 'xxxtt';2511 actualmatch = string.match(pattern);2512 expectedmatch = Array('tt');2513 addThis();2514/* ECMA spec says that each atom in a range must be a single character2515 status = inSection(385);2516 pattern = /([a-\d]+)/;2517 string = 'za-9z';2518 actualmatch = string.match(pattern);2519 expectedmatch = Array('9', '9');2520 addThis();2521 status = inSection(386);2522 pattern = /([\d-z]+)/;2523 string = 'a0-za';2524 actualmatch = string.match(pattern);2525 expectedmatch = Array('0-z', '0-z');2526 addThis();2527*/2528/* ECMA doesn't support [:2529 status = inSection(387);2530 pattern = /([a-[:digit:]]+)/;2531 string = 'za-9z';2532 actualmatch = string.match(pattern);2533 expectedmatch = Array('a-9', 'a-9');2534 addThis();2535 status = inSection(388);2536 pattern = /([[:digit:]-z]+)/;2537 string = '=0-z=';2538 actualmatch = string.match(pattern);2539 expectedmatch = Array('0-z', '0-z');2540 addThis();2541 status = inSection(389);2542 pattern = /([[:digit:]-[:alpha:]]+)/;2543 string = '=0-z=';2544 actualmatch = string.match(pattern);2545 expectedmatch = Array('0-z', '0-z');2546 addThis();2547*/2548 status = inSection(390);2549 pattern = /(\d+\.\d+)/;2550 string = '3.1415926';2551 actualmatch = string.match(pattern);2552 expectedmatch = Array('3.1415926', '3.1415926');2553 addThis();2554 status = inSection(391);2555 pattern = /\.c(pp|xx|c)?$/i;2556 string = 'IO.c';2557 actualmatch = string.match(pattern);2558 expectedmatch = Array('.c', undefined);2559 addThis();2560 status = inSection(392);2561 pattern = /(\.c(pp|xx|c)?$)/i;2562 string = 'IO.c';2563 actualmatch = string.match(pattern);2564 expectedmatch = Array('.c', '.c', undefined);2565 addThis();2566 status = inSection(393);2567 pattern = /(^|a)b/;2568 string = 'ab';2569 actualmatch = string.match(pattern);2570 expectedmatch = Array('ab', 'a');2571 addThis();2572 status = inSection(394);2573 pattern = /^([ab]*?)(b)?(c)$/;2574 string = 'abac';2575 actualmatch = string.match(pattern);2576 expectedmatch = Array('abac', 'aba', undefined, 'c');2577 addThis();2578 status = inSection(395);2579 pattern = /^(?:.,){2}c/i;2580 string = 'a,b,c';2581 actualmatch = string.match(pattern);2582 expectedmatch = Array('a,b,c');2583 addThis();2584 status = inSection(396);2585 pattern = /^(.,){2}c/i;2586 string = 'a,b,c';2587 actualmatch = string.match(pattern);2588 expectedmatch = Array('a,b,c', 'b,');2589 addThis();2590 status = inSection(397);2591 pattern = /^(?:[^,]*,){2}c/;2592 string = 'a,b,c';2593 actualmatch = string.match(pattern);2594 expectedmatch = Array('a,b,c');2595 addThis();2596 status = inSection(398);2597 pattern = /^([^,]*,){2}c/;2598 string = 'a,b,c';2599 actualmatch = string.match(pattern);2600 expectedmatch = Array('a,b,c', 'b,');2601 addThis();2602 status = inSection(399);2603 pattern = /^([^,]*,){3}d/;2604 string = 'aaa,b,c,d';2605 actualmatch = string.match(pattern);2606 expectedmatch = Array('aaa,b,c,d', 'c,');2607 addThis();2608 status = inSection(400);2609 pattern = /^([^,]*,){3,}d/;2610 string = 'aaa,b,c,d';2611 actualmatch = string.match(pattern);2612 expectedmatch = Array('aaa,b,c,d', 'c,');2613 addThis();2614 status = inSection(401);2615 pattern = /^([^,]*,){0,3}d/;2616 string = 'aaa,b,c,d';2617 actualmatch = string.match(pattern);2618 expectedmatch = Array('aaa,b,c,d', 'c,');2619 addThis();2620 status = inSection(402);2621 pattern = /^([^,]{1,3},){3}d/i;2622 string = 'aaa,b,c,d';2623 actualmatch = string.match(pattern);2624 expectedmatch = Array('aaa,b,c,d', 'c,');2625 addThis();2626 status = inSection(403);2627 pattern = /^([^,]{1,3},){3,}d/;2628 string = 'aaa,b,c,d';2629 actualmatch = string.match(pattern);2630 expectedmatch = Array('aaa,b,c,d', 'c,');2631 addThis();2632 status = inSection(404);2633 pattern = /^([^,]{1,3},){0,3}d/;2634 string = 'aaa,b,c,d';2635 actualmatch = string.match(pattern);2636 expectedmatch = Array('aaa,b,c,d', 'c,');2637 addThis();2638 status = inSection(405);2639 pattern = /^([^,]{1,},){3}d/;2640 string = 'aaa,b,c,d';2641 actualmatch = string.match(pattern);2642 expectedmatch = Array('aaa,b,c,d', 'c,');2643 addThis();2644 status = inSection(406);2645 pattern = /^([^,]{1,},){3,}d/;2646 string = 'aaa,b,c,d';2647 actualmatch = string.match(pattern);2648 expectedmatch = Array('aaa,b,c,d', 'c,');2649 addThis();2650 status = inSection(407);2651 pattern = /^([^,]{1,},){0,3}d/;2652 string = 'aaa,b,c,d';2653 actualmatch = string.match(pattern);2654 expectedmatch = Array('aaa,b,c,d', 'c,');2655 addThis();2656 status = inSection(408);2657 pattern = /^([^,]{0,3},){3}d/i;2658 string = 'aaa,b,c,d';2659 actualmatch = string.match(pattern);2660 expectedmatch = Array('aaa,b,c,d', 'c,');2661 addThis();2662 status = inSection(409);2663 pattern = /^([^,]{0,3},){3,}d/;2664 string = 'aaa,b,c,d';2665 actualmatch = string.match(pattern);2666 expectedmatch = Array('aaa,b,c,d', 'c,');2667 addThis();2668 status = inSection(410);2669 pattern = /^([^,]{0,3},){0,3}d/;2670 string = 'aaa,b,c,d';2671 actualmatch = string.match(pattern);2672 expectedmatch = Array('aaa,b,c,d', 'c,');2673 addThis();2674/* ECMA doesn't support \A2675 status = inSection(411);2676 pattern = /(?!\A)x/m;2677 string = 'a\nxb\n';2678 actualmatch = string.match(pattern);2679 expectedmatch = Array('\n');2680 addThis();2681*/2682 status = inSection(412);2683 pattern = /^(a(b)?)+$/;2684 string = 'aba';2685 actualmatch = string.match(pattern);2686 expectedmatch = Array('aba', 'a', undefined);2687 addThis();2688 status = inSection(413);2689 pattern = /^(aa(bb)?)+$/;2690 string = 'aabbaa';2691 actualmatch = string.match(pattern);2692 expectedmatch = Array('aabbaa', 'aa', undefined);2693 addThis();2694 status = inSection(414);2695 pattern = /^.{9}abc.*\n/m;2696 string = '123\nabcabcabcabc\n';2697 actualmatch = string.match(pattern);2698 expectedmatch = Array('abcabcabcabc\n');2699 addThis();2700 status = inSection(415);2701 pattern = /^(a)?a$/;2702 string = 'a';2703 actualmatch = string.match(pattern);2704 expectedmatch = Array('a', undefined);2705 addThis();2706 status = inSection(416);2707 pattern = /^(a\1?)(a\1?)(a\2?)(a\3?)$/;2708 string = 'aaaaaa';2709 actualmatch = string.match(pattern);2710 expectedmatch = Array('aaaaaa', 'a', 'aa', 'a', 'aa');2711 addThis();2712/* Can't refer to a capture before it's encountered & completed2713 status = inSection(417);2714 pattern = /^(a\1?){4}$/;2715 string = 'aaaaaa';2716 actualmatch = string.match(pattern);2717 expectedmatch = Array('aaaaaa', 'aaa');2718 addThis();2719*/2720 status = inSection(418);2721 pattern = /^(0+)?(?:x(1))?/;2722 string = 'x1';2723 actualmatch = string.match(pattern);2724 expectedmatch = Array('x1', undefined, '1');2725 addThis();2726 status = inSection(419);2727 pattern = /^([0-9a-fA-F]+)(?:x([0-9a-fA-F]+)?)(?:x([0-9a-fA-F]+))?/;2728 string = '012cxx0190';2729 actualmatch = string.match(pattern);2730 expectedmatch = Array('012cxx0190', '012c', undefined, '0190');2731 addThis();2732 status = inSection(420);2733 pattern = /^(b+?|a){1,2}c/;2734 string = 'bbbac';2735 actualmatch = string.match(pattern);2736 expectedmatch = Array('bbbac', 'a');2737 addThis();2738 status = inSection(421);2739 pattern = /^(b+?|a){1,2}c/;2740 string = 'bbbbac';2741 actualmatch = string.match(pattern);2742 expectedmatch = Array('bbbbac', 'a');2743 addThis();2744 status = inSection(422);2745 pattern = /((?:aaaa|bbbb)cccc)?/;2746 string = 'aaaacccc';2747 actualmatch = string.match(pattern);2748 expectedmatch = Array('aaaacccc', 'aaaacccc');2749 addThis();2750 status = inSection(423);2751 pattern = /((?:aaaa|bbbb)cccc)?/;2752 string = 'bbbbcccc';2753 actualmatch = string.match(pattern);2754 expectedmatch = Array('bbbbcccc', 'bbbbcccc');2755 addThis();2756//-----------------------------------------------------------------------------2757 test();2758//-----------------------------------------------------------------------------2759 function addThis()2760 {2761 if(omitCurrentSection())2762 return;2763 statusmessages[i] = status;2764 patterns[i] = pattern;2765 strings[i] = string;2766 actualmatches[i] = actualmatch;2767 expectedmatches[i] = expectedmatch;2768 i++;2769 }2770 function omitCurrentSection()2771 {2772 try2773 {2774 // current section number is in global status variable2775 var n = status.match(/(\d+)/)[1];2776 return ((n < cnLBOUND) || (n > cnUBOUND));2777 }2778 catch(e)2779 {2780 return false;2781 }2782 }2783 function test()2784 {2785 enterFunc ('test');2786 printBugNumber(BUGNUMBER);2787 printStatus (summary);2788 testRegExp(statusmessages, patterns, strings, actualmatches, expectedmatches);2789 exitFunc ('test');...
perlstress-002.js
Source:perlstress-002.js
1/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */2/* ***** BEGIN LICENSE BLOCK *****3 * Version: MPL 1.1/GPL 2.0/LGPL 2.14 *5 * The contents of this file are subject to the Mozilla Public License Version6 * 1.1 (the "License"); you may not use this file except in compliance with7 * the License. You may obtain a copy of the License at8 * http://www.mozilla.org/MPL/9 *10 * Software distributed under the License is distributed on an "AS IS" basis,11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License12 * for the specific language governing rights and limitations under the13 * License.14 *15 * The Original Code is JavaScript Engine testing utilities.16 *17 * The Initial Developer of the Original Code is18 * Netscape Communications Corp.19 * Portions created by the Initial Developer are Copyright (C) 200220 * the Initial Developer. All Rights Reserved.21 *22 * Contributor(s):23 * pschwartau@netscape.com, rogerl@netscape.com24 *25 * Alternatively, the contents of this file may be used under the terms of26 * either the GNU General Public License Version 2 or later (the "GPL"), or27 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),28 * in which case the provisions of the GPL or the LGPL are applicable instead29 * of those above. If you wish to allow use of your version of this file only30 * under the terms of either the GPL or the LGPL, and not to allow others to31 * use your version of this file under the terms of the MPL, indicate your32 * decision by deleting the provisions above and replace them with the notice33 * and other provisions required by the GPL or the LGPL. If you do not delete34 * the provisions above, a recipient may use your version of this file under35 * the terms of any one of the MPL, the GPL or the LGPL.36 *37 * ***** END LICENSE BLOCK ***** */38/*39 *40 * Date: 2002-07-0741 * SUMMARY: Testing JS RegExp engine against Perl 5 RegExp engine.42 * Adjust cnLBOUND, cnUBOUND below to restrict which sections are tested.43 *44 * This test was created by running various patterns and strings through the45 * Perl 5 RegExp engine. We saved the results below to test the JS engine.46 *47 * Each of the examples below is a negative test; that is, each produces a48 * null match in Perl. Thus we set |expectedmatch| = |null| in each section.49 *50 * NOTE: ECMA/JS and Perl do differ on certain points. We have either commented51 * out such sections altogether, or modified them to fit what we expect from JS.52 *53 * EXAMPLES:54 *55 * - ECMA does support (?: (?= and (?! operators, but doesn't support (?< etc.56 *57 * - ECMA doesn't support (?(condition)58 *59 */60//-----------------------------------------------------------------------------61var gTestfile = 'perlstress-002.js';62var i = 0;63var BUGNUMBER = 85721;64var summary = 'Testing regular expression edge cases';65var cnSingleSpace = ' ';66var status = '';67var statusmessages = new Array();68var pattern = '';69var patterns = new Array();70var string = '';71var strings = new Array();72var actualmatch = '';73var actualmatches = new Array();74var expectedmatch = '';75var expectedmatches = new Array();76var cnLBOUND = 0;77var cnUBOUND = 1000;78status = inSection(1);79pattern = /abc/;80string = 'xbc';81actualmatch = string.match(pattern);82expectedmatch = null;83addThis();84status = inSection(2);85pattern = /abc/;86string = 'axc';87actualmatch = string.match(pattern);88expectedmatch = null;89addThis();90status = inSection(3);91pattern = /abc/;92string = 'abx';93actualmatch = string.match(pattern);94expectedmatch = null;95addThis();96status = inSection(4);97pattern = /ab+bc/;98string = 'abc';99actualmatch = string.match(pattern);100expectedmatch = null;101addThis();102status = inSection(5);103pattern = /ab+bc/;104string = 'abq';105actualmatch = string.match(pattern);106expectedmatch = null;107addThis();108status = inSection(6);109pattern = /ab{1,}bc/;110string = 'abq';111actualmatch = string.match(pattern);112expectedmatch = null;113addThis();114status = inSection(7);115pattern = /ab{4,5}bc/;116string = 'abbbbc';117actualmatch = string.match(pattern);118expectedmatch = null;119addThis();120status = inSection(8);121pattern = /ab?bc/;122string = 'abbbbc';123actualmatch = string.match(pattern);124expectedmatch = null;125addThis();126status = inSection(9);127pattern = /^abc$/;128string = 'abcc';129actualmatch = string.match(pattern);130expectedmatch = null;131addThis();132status = inSection(10);133pattern = /^abc$/;134string = 'aabc';135actualmatch = string.match(pattern);136expectedmatch = null;137addThis();138status = inSection(11);139pattern = /abc$/;140string = 'aabcd';141actualmatch = string.match(pattern);142expectedmatch = null;143addThis();144status = inSection(12);145pattern = /a.*c/;146string = 'axyzd';147actualmatch = string.match(pattern);148expectedmatch = null;149addThis();150status = inSection(13);151pattern = /a[bc]d/;152string = 'abc';153actualmatch = string.match(pattern);154expectedmatch = null;155addThis();156status = inSection(14);157pattern = /a[b-d]e/;158string = 'abd';159actualmatch = string.match(pattern);160expectedmatch = null;161addThis();162status = inSection(15);163pattern = /a[^bc]d/;164string = 'abd';165actualmatch = string.match(pattern);166expectedmatch = null;167addThis();168status = inSection(16);169pattern = /a[^-b]c/;170string = 'a-c';171actualmatch = string.match(pattern);172expectedmatch = null;173addThis();174status = inSection(17);175pattern = /a[^]b]c/;176string = 'a]c';177actualmatch = string.match(pattern);178expectedmatch = null;179addThis();180status = inSection(18);181pattern = /\by\b/;182string = 'xy';183actualmatch = string.match(pattern);184expectedmatch = null;185addThis();186status = inSection(19);187pattern = /\by\b/;188string = 'yz';189actualmatch = string.match(pattern);190expectedmatch = null;191addThis();192status = inSection(20);193pattern = /\by\b/;194string = 'xyz';195actualmatch = string.match(pattern);196expectedmatch = null;197addThis();198status = inSection(21);199pattern = /\Ba\B/;200string = 'a-';201actualmatch = string.match(pattern);202expectedmatch = null;203addThis();204status = inSection(22);205pattern = /\Ba\B/;206string = '-a';207actualmatch = string.match(pattern);208expectedmatch = null;209addThis();210status = inSection(23);211pattern = /\Ba\B/;212string = '-a-';213actualmatch = string.match(pattern);214expectedmatch = null;215addThis();216status = inSection(24);217pattern = /\w/;218string = '-';219actualmatch = string.match(pattern);220expectedmatch = null;221addThis();222status = inSection(25);223pattern = /\W/;224string = 'a';225actualmatch = string.match(pattern);226expectedmatch = null;227addThis();228status = inSection(26);229pattern = /a\sb/;230string = 'a-b';231actualmatch = string.match(pattern);232expectedmatch = null;233addThis();234status = inSection(27);235pattern = /\d/;236string = '-';237actualmatch = string.match(pattern);238expectedmatch = null;239addThis();240status = inSection(28);241pattern = /\D/;242string = '1';243actualmatch = string.match(pattern);244expectedmatch = null;245addThis();246status = inSection(29);247pattern = /[\w]/;248string = '-';249actualmatch = string.match(pattern);250expectedmatch = null;251addThis();252status = inSection(30);253pattern = /[\W]/;254string = 'a';255actualmatch = string.match(pattern);256expectedmatch = null;257addThis();258status = inSection(31);259pattern = /a[\s]b/;260string = 'a-b';261actualmatch = string.match(pattern);262expectedmatch = null;263addThis();264status = inSection(32);265pattern = /[\d]/;266string = '-';267actualmatch = string.match(pattern);268expectedmatch = null;269addThis();270status = inSection(33);271pattern = /[\D]/;272string = '1';273actualmatch = string.match(pattern);274expectedmatch = null;275addThis();276status = inSection(34);277pattern = /$b/;278string = 'b';279actualmatch = string.match(pattern);280expectedmatch = null;281addThis();282status = inSection(35);283pattern = /^(ab|cd)e/;284string = 'abcde';285actualmatch = string.match(pattern);286expectedmatch = null;287addThis();288status = inSection(36);289pattern = /a[bcd]+dcdcde/;290string = 'adcdcde';291actualmatch = string.match(pattern);292expectedmatch = null;293addThis();294status = inSection(37);295pattern = /(bc+d$|ef*g.|h?i(j|k))/;296string = 'effg';297actualmatch = string.match(pattern);298expectedmatch = null;299addThis();300status = inSection(38);301pattern = /(bc+d$|ef*g.|h?i(j|k))/;302string = 'bcdd';303actualmatch = string.match(pattern);304expectedmatch = null;305addThis();306status = inSection(39);307pattern = /[k]/;308string = 'ab';309actualmatch = string.match(pattern);310expectedmatch = null;311addThis();312// MODIFIED - ECMA has different rules for paren contents.313status = inSection(40);314pattern = /(a)|\1/;315string = 'x';316actualmatch = string.match(pattern);317//expectedmatch = null;318expectedmatch = Array("", undefined);319addThis();320// MODIFIED - ECMA has different rules for paren contents.321status = inSection(41);322pattern = /((\3|b)\2(a)x)+/;323string = 'aaxabxbaxbbx';324actualmatch = string.match(pattern);325//expectedmatch = null;326expectedmatch = Array("ax", "ax", "", "a");327addThis();328status = inSection(42);329pattern = /abc/i;330string = 'XBC';331actualmatch = string.match(pattern);332expectedmatch = null;333addThis();334status = inSection(43);335pattern = /abc/i;336string = 'AXC';337actualmatch = string.match(pattern);338expectedmatch = null;339addThis();340status = inSection(44);341pattern = /abc/i;342string = 'ABX';343actualmatch = string.match(pattern);344expectedmatch = null;345addThis();346status = inSection(45);347pattern = /ab+bc/i;348string = 'ABC';349actualmatch = string.match(pattern);350expectedmatch = null;351addThis();352status = inSection(46);353pattern = /ab+bc/i;354string = 'ABQ';355actualmatch = string.match(pattern);356expectedmatch = null;357addThis();358status = inSection(47);359pattern = /ab{1,}bc/i;360string = 'ABQ';361actualmatch = string.match(pattern);362expectedmatch = null;363addThis();364status = inSection(48);365pattern = /ab{4,5}?bc/i;366string = 'ABBBBC';367actualmatch = string.match(pattern);368expectedmatch = null;369addThis();370status = inSection(49);371pattern = /ab??bc/i;372string = 'ABBBBC';373actualmatch = string.match(pattern);374expectedmatch = null;375addThis();376status = inSection(50);377pattern = /^abc$/i;378string = 'ABCC';379actualmatch = string.match(pattern);380expectedmatch = null;381addThis();382status = inSection(51);383pattern = /^abc$/i;384string = 'AABC';385actualmatch = string.match(pattern);386expectedmatch = null;387addThis();388status = inSection(52);389pattern = /a.*c/i;390string = 'AXYZD';391actualmatch = string.match(pattern);392expectedmatch = null;393addThis();394status = inSection(53);395pattern = /a[bc]d/i;396string = 'ABC';397actualmatch = string.match(pattern);398expectedmatch = null;399addThis();400status = inSection(54);401pattern = /a[b-d]e/i;402string = 'ABD';403actualmatch = string.match(pattern);404expectedmatch = null;405addThis();406status = inSection(55);407pattern = /a[^bc]d/i;408string = 'ABD';409actualmatch = string.match(pattern);410expectedmatch = null;411addThis();412status = inSection(56);413pattern = /a[^-b]c/i;414string = 'A-C';415actualmatch = string.match(pattern);416expectedmatch = null;417addThis();418status = inSection(57);419pattern = /a[^]b]c/i;420string = 'A]C';421actualmatch = string.match(pattern);422expectedmatch = null;423addThis();424status = inSection(58);425pattern = /$b/i;426string = 'B';427actualmatch = string.match(pattern);428expectedmatch = null;429addThis();430status = inSection(59);431pattern = /^(ab|cd)e/i;432string = 'ABCDE';433actualmatch = string.match(pattern);434expectedmatch = null;435addThis();436status = inSection(60);437pattern = /a[bcd]+dcdcde/i;438string = 'ADCDCDE';439actualmatch = string.match(pattern);440expectedmatch = null;441addThis();442status = inSection(61);443pattern = /(bc+d$|ef*g.|h?i(j|k))/i;444string = 'EFFG';445actualmatch = string.match(pattern);446expectedmatch = null;447addThis();448status = inSection(62);449pattern = /(bc+d$|ef*g.|h?i(j|k))/i;450string = 'BCDD';451actualmatch = string.match(pattern);452expectedmatch = null;453addThis();454status = inSection(63);455pattern = /[k]/i;456string = 'AB';457actualmatch = string.match(pattern);458expectedmatch = null;459addThis();460status = inSection(64);461pattern = /^(a\1?){4}$/;462string = 'aaaaaaaaa';463actualmatch = string.match(pattern);464expectedmatch = null;465addThis();466status = inSection(65);467pattern = /^(a\1?){4}$/;468string = 'aaaaaaaaaaa';469actualmatch = string.match(pattern);470expectedmatch = null;471addThis();472/* ECMA doesn't support (?(473 status = inSection(66);474 pattern = /^(a(?(1)\1)){4}$/;475 string = 'aaaaaaaaa';476 actualmatch = string.match(pattern);477 expectedmatch = null;478 addThis();479 status = inSection(67);480 pattern = /^(a(?(1)\1)){4}$/;481 string = 'aaaaaaaaaaa';482 actualmatch = string.match(pattern);483 expectedmatch = null;484 addThis();485*/486/* ECMA doesn't support (?<487 status = inSection(68);488 pattern = /(?<=a)b/;489 string = 'cb';490 actualmatch = string.match(pattern);491 expectedmatch = null;492 addThis();493 status = inSection(69);494 pattern = /(?<=a)b/;495 string = 'b';496 actualmatch = string.match(pattern);497 expectedmatch = null;498 addThis();499 status = inSection(70);500 pattern = /(?<!c)b/;501 string = 'cb';502 actualmatch = string.match(pattern);503 expectedmatch = null;504 addThis();505*/506/* ECMA doesn't support (?(condition)507 status = inSection(71);508 pattern = /(?:(?i)a)b/;509 string = 'aB';510 actualmatch = string.match(pattern);511 expectedmatch = null;512 addThis();513 status = inSection(72);514 pattern = /((?i)a)b/;515 string = 'aB';516 actualmatch = string.match(pattern);517 expectedmatch = null;518 addThis();519 status = inSection(73);520 pattern = /(?i:a)b/;521 string = 'aB';522 actualmatch = string.match(pattern);523 expectedmatch = null;524 addThis();525 status = inSection(74);526 pattern = /((?i:a))b/;527 string = 'aB';528 actualmatch = string.match(pattern);529 expectedmatch = null;530 addThis();531 status = inSection(75);532 pattern = /(?:(?-i)a)b/i;533 string = 'Ab';534 actualmatch = string.match(pattern);535 expectedmatch = null;536 addThis();537 status = inSection(76);538 pattern = /((?-i)a)b/i;539 string = 'Ab';540 actualmatch = string.match(pattern);541 expectedmatch = null;542 addThis();543 status = inSection(77);544 pattern = /(?:(?-i)a)b/i;545 string = 'AB';546 actualmatch = string.match(pattern);547 expectedmatch = null;548 addThis();549 status = inSection(78);550 pattern = /((?-i)a)b/i;551 string = 'AB';552 actualmatch = string.match(pattern);553 expectedmatch = null;554 addThis();555 status = inSection(79);556 pattern = /(?-i:a)b/i;557 string = 'Ab';558 actualmatch = string.match(pattern);559 expectedmatch = null;560 addThis();561 status = inSection(80);562 pattern = /((?-i:a))b/i;563 string = 'Ab';564 actualmatch = string.match(pattern);565 expectedmatch = null;566 addThis();567 status = inSection(81);568 pattern = /(?-i:a)b/i;569 string = 'AB';570 actualmatch = string.match(pattern);571 expectedmatch = null;572 addThis();573 status = inSection(82);574 pattern = /((?-i:a))b/i;575 string = 'AB';576 actualmatch = string.match(pattern);577 expectedmatch = null;578 addThis();579 status = inSection(83);580 pattern = /((?-i:a.))b/i;581 string = 'a\nB';582 actualmatch = string.match(pattern);583 expectedmatch = null;584 addThis();585 status = inSection(84);586 pattern = /((?s-i:a.))b/i;587 string = 'B\nB';588 actualmatch = string.match(pattern);589 expectedmatch = null;590 addThis();591*/592/* ECMA doesn't support (?<593 status = inSection(85);594 pattern = /(?<![cd])b/;595 string = 'dbcb';596 actualmatch = string.match(pattern);597 expectedmatch = null;598 addThis();599 status = inSection(86);600 pattern = /(?<!(c|d))b/;601 string = 'dbcb';602 actualmatch = string.match(pattern);603 expectedmatch = null;604 addThis();605*/606status = inSection(87);607pattern = /^(?:a?b?)*$/;608string = 'a--';609actualmatch = string.match(pattern);610expectedmatch = null;611addThis();612status = inSection(88);613pattern = /^b/;614string = 'a\nb\nc\n';615actualmatch = string.match(pattern);616expectedmatch = null;617addThis();618status = inSection(89);619pattern = /()^b/;620string = 'a\nb\nc\n';621actualmatch = string.match(pattern);622expectedmatch = null;623addThis();624/* ECMA doesn't support (?(625 status = inSection(90);626 pattern = /(?(1)a|b)/;627 string = 'a';628 actualmatch = string.match(pattern);629 expectedmatch = null;630 addThis();631 status = inSection(91);632 pattern = /(x)?(?(1)a|b)/;633 string = 'a';634 actualmatch = string.match(pattern);635 expectedmatch = null;636 addThis();637 status = inSection(92);638 pattern = /()(?(1)b|a)/;639 string = 'a';640 actualmatch = string.match(pattern);641 expectedmatch = null;642 addThis();643 status = inSection(93);644 pattern = /^(\()?blah(?(1)(\)))$/;645 string = 'blah)';646 actualmatch = string.match(pattern);647 expectedmatch = null;648 addThis();649 status = inSection(94);650 pattern = /^(\()?blah(?(1)(\)))$/;651 string = '(blah';652 actualmatch = string.match(pattern);653 expectedmatch = null;654 addThis();655 status = inSection(95);656 pattern = /^(\(+)?blah(?(1)(\)))$/;657 string = 'blah)';658 actualmatch = string.match(pattern);659 expectedmatch = null;660 addThis();661 status = inSection(96);662 pattern = /^(\(+)?blah(?(1)(\)))$/;663 string = '(blah';664 actualmatch = string.match(pattern);665 expectedmatch = null;666 addThis();667 status = inSection(97);668 pattern = /(?(?{0})a|b)/;669 string = 'a';670 actualmatch = string.match(pattern);671 expectedmatch = null;672 addThis();673 status = inSection(98);674 pattern = /(?(?{1})b|a)/;675 string = 'a';676 actualmatch = string.match(pattern);677 expectedmatch = null;678 addThis();679 status = inSection(99);680 pattern = /(?(?!a)a|b)/;681 string = 'a';682 actualmatch = string.match(pattern);683 expectedmatch = null;684 addThis();685 status = inSection(100);686 pattern = /(?(?=a)b|a)/;687 string = 'a';688 actualmatch = string.match(pattern);689 expectedmatch = null;690 addThis();691*/692status = inSection(101);693pattern = /^(?=(a+?))\1ab/;694string = 'aaab';695actualmatch = string.match(pattern);696expectedmatch = null;697addThis();698status = inSection(102);699pattern = /^(?=(a+?))\1ab/;700string = 'aaab';701actualmatch = string.match(pattern);702expectedmatch = null;703addThis();704status = inSection(103);705pattern = /([\w:]+::)?(\w+)$/;706string = 'abcd:';707actualmatch = string.match(pattern);708expectedmatch = null;709addThis();710status = inSection(104);711pattern = /([\w:]+::)?(\w+)$/;712string = 'abcd:';713actualmatch = string.match(pattern);714expectedmatch = null;715addThis();716status = inSection(105);717pattern = /(>a+)ab/;718string = 'aaab';719actualmatch = string.match(pattern);720expectedmatch = null;721addThis();722status = inSection(106);723pattern = /a\Z/;724string = 'a\nb\n';725actualmatch = string.match(pattern);726expectedmatch = null;727addThis();728status = inSection(107);729pattern = /a\z/;730string = 'a\nb\n';731actualmatch = string.match(pattern);732expectedmatch = null;733addThis();734status = inSection(108);735pattern = /a$/;736string = 'a\nb\n';737actualmatch = string.match(pattern);738expectedmatch = null;739addThis();740status = inSection(109);741pattern = /a\z/;742string = 'b\na\n';743actualmatch = string.match(pattern);744expectedmatch = null;745addThis();746status = inSection(110);747pattern = /a\z/m;748string = 'a\nb\n';749actualmatch = string.match(pattern);750expectedmatch = null;751addThis();752status = inSection(111);753pattern = /a\z/m;754string = 'b\na\n';755actualmatch = string.match(pattern);756expectedmatch = null;757addThis();758status = inSection(112);759pattern = /aa\Z/;760string = 'aa\nb\n';761actualmatch = string.match(pattern);762expectedmatch = null;763addThis();764status = inSection(113);765pattern = /aa\z/;766string = 'aa\nb\n';767actualmatch = string.match(pattern);768expectedmatch = null;769addThis();770status = inSection(114);771pattern = /aa$/;772string = 'aa\nb\n';773actualmatch = string.match(pattern);774expectedmatch = null;775addThis();776status = inSection(115);777pattern = /aa\z/;778string = 'b\naa\n';779actualmatch = string.match(pattern);780expectedmatch = null;781addThis();782status = inSection(116);783pattern = /aa\z/m;784string = 'aa\nb\n';785actualmatch = string.match(pattern);786expectedmatch = null;787addThis();788status = inSection(117);789pattern = /aa\z/m;790string = 'b\naa\n';791actualmatch = string.match(pattern);792expectedmatch = null;793addThis();794status = inSection(118);795pattern = /aa\Z/;796string = 'ac\nb\n';797actualmatch = string.match(pattern);798expectedmatch = null;799addThis();800status = inSection(119);801pattern = /aa\z/;802string = 'ac\nb\n';803actualmatch = string.match(pattern);804expectedmatch = null;805addThis();806status = inSection(120);807pattern = /aa$/;808string = 'ac\nb\n';809actualmatch = string.match(pattern);810expectedmatch = null;811addThis();812status = inSection(121);813pattern = /aa\Z/;814string = 'b\nac\n';815actualmatch = string.match(pattern);816expectedmatch = null;817addThis();818status = inSection(122);819pattern = /aa\z/;820string = 'b\nac\n';821actualmatch = string.match(pattern);822expectedmatch = null;823addThis();824status = inSection(123);825pattern = /aa$/;826string = 'b\nac\n';827actualmatch = string.match(pattern);828expectedmatch = null;829addThis();830status = inSection(124);831pattern = /aa\Z/;832string = 'b\nac';833actualmatch = string.match(pattern);834expectedmatch = null;835addThis();836status = inSection(125);837pattern = /aa\z/;838string = 'b\nac';839actualmatch = string.match(pattern);840expectedmatch = null;841addThis();842status = inSection(126);843pattern = /aa$/;844string = 'b\nac';845actualmatch = string.match(pattern);846expectedmatch = null;847addThis();848status = inSection(127);849pattern = /aa\Z/m;850string = 'ac\nb\n';851actualmatch = string.match(pattern);852expectedmatch = null;853addThis();854status = inSection(128);855pattern = /aa\z/m;856string = 'ac\nb\n';857actualmatch = string.match(pattern);858expectedmatch = null;859addThis();860status = inSection(129);861pattern = /aa$/m;862string = 'ac\nb\n';863actualmatch = string.match(pattern);864expectedmatch = null;865addThis();866status = inSection(130);867pattern = /aa\Z/m;868string = 'b\nac\n';869actualmatch = string.match(pattern);870expectedmatch = null;871addThis();872status = inSection(131);873pattern = /aa\z/m;874string = 'b\nac\n';875actualmatch = string.match(pattern);876expectedmatch = null;877addThis();878status = inSection(132);879pattern = /aa$/m;880string = 'b\nac\n';881actualmatch = string.match(pattern);882expectedmatch = null;883addThis();884status = inSection(133);885pattern = /aa\Z/m;886string = 'b\nac';887actualmatch = string.match(pattern);888expectedmatch = null;889addThis();890status = inSection(134);891pattern = /aa\z/m;892string = 'b\nac';893actualmatch = string.match(pattern);894expectedmatch = null;895addThis();896status = inSection(135);897pattern = /aa$/m;898string = 'b\nac';899actualmatch = string.match(pattern);900expectedmatch = null;901addThis();902status = inSection(136);903pattern = /aa\Z/;904string = 'ca\nb\n';905actualmatch = string.match(pattern);906expectedmatch = null;907addThis();908status = inSection(137);909pattern = /aa\z/;910string = 'ca\nb\n';911actualmatch = string.match(pattern);912expectedmatch = null;913addThis();914status = inSection(138);915pattern = /aa$/;916string = 'ca\nb\n';917actualmatch = string.match(pattern);918expectedmatch = null;919addThis();920status = inSection(139);921pattern = /aa\Z/;922string = 'b\nca\n';923actualmatch = string.match(pattern);924expectedmatch = null;925addThis();926status = inSection(140);927pattern = /aa\z/;928string = 'b\nca\n';929actualmatch = string.match(pattern);930expectedmatch = null;931addThis();932status = inSection(141);933pattern = /aa$/;934string = 'b\nca\n';935actualmatch = string.match(pattern);936expectedmatch = null;937addThis();938status = inSection(142);939pattern = /aa\Z/;940string = 'b\nca';941actualmatch = string.match(pattern);942expectedmatch = null;943addThis();944status = inSection(143);945pattern = /aa\z/;946string = 'b\nca';947actualmatch = string.match(pattern);948expectedmatch = null;949addThis();950status = inSection(144);951pattern = /aa$/;952string = 'b\nca';953actualmatch = string.match(pattern);954expectedmatch = null;955addThis();956status = inSection(145);957pattern = /aa\Z/m;958string = 'ca\nb\n';959actualmatch = string.match(pattern);960expectedmatch = null;961addThis();962status = inSection(146);963pattern = /aa\z/m;964string = 'ca\nb\n';965actualmatch = string.match(pattern);966expectedmatch = null;967addThis();968status = inSection(147);969pattern = /aa$/m;970string = 'ca\nb\n';971actualmatch = string.match(pattern);972expectedmatch = null;973addThis();974status = inSection(148);975pattern = /aa\Z/m;976string = 'b\nca\n';977actualmatch = string.match(pattern);978expectedmatch = null;979addThis();980status = inSection(149);981pattern = /aa\z/m;982string = 'b\nca\n';983actualmatch = string.match(pattern);984expectedmatch = null;985addThis();986status = inSection(150);987pattern = /aa$/m;988string = 'b\nca\n';989actualmatch = string.match(pattern);990expectedmatch = null;991addThis();992status = inSection(151);993pattern = /aa\Z/m;994string = 'b\nca';995actualmatch = string.match(pattern);996expectedmatch = null;997addThis();998status = inSection(152);999pattern = /aa\z/m;1000string = 'b\nca';1001actualmatch = string.match(pattern);1002expectedmatch = null;1003addThis();1004status = inSection(153);1005pattern = /aa$/m;1006string = 'b\nca';1007actualmatch = string.match(pattern);1008expectedmatch = null;1009addThis();1010status = inSection(154);1011pattern = /ab\Z/;1012string = 'ab\nb\n';1013actualmatch = string.match(pattern);1014expectedmatch = null;1015addThis();1016status = inSection(155);1017pattern = /ab\z/;1018string = 'ab\nb\n';1019actualmatch = string.match(pattern);1020expectedmatch = null;1021addThis();1022status = inSection(156);1023pattern = /ab$/;1024string = 'ab\nb\n';1025actualmatch = string.match(pattern);1026expectedmatch = null;1027addThis();1028status = inSection(157);1029pattern = /ab\z/;1030string = 'b\nab\n';1031actualmatch = string.match(pattern);1032expectedmatch = null;1033addThis();1034status = inSection(158);1035pattern = /ab\z/m;1036string = 'ab\nb\n';1037actualmatch = string.match(pattern);1038expectedmatch = null;1039addThis();1040status = inSection(159);1041pattern = /ab\z/m;1042string = 'b\nab\n';1043actualmatch = string.match(pattern);1044expectedmatch = null;1045addThis();1046status = inSection(160);1047pattern = /ab\Z/;1048string = 'ac\nb\n';1049actualmatch = string.match(pattern);1050expectedmatch = null;1051addThis();1052status = inSection(161);1053pattern = /ab\z/;1054string = 'ac\nb\n';1055actualmatch = string.match(pattern);1056expectedmatch = null;1057addThis();1058status = inSection(162);1059pattern = /ab$/;1060string = 'ac\nb\n';1061actualmatch = string.match(pattern);1062expectedmatch = null;1063addThis();1064status = inSection(163);1065pattern = /ab\Z/;1066string = 'b\nac\n';1067actualmatch = string.match(pattern);1068expectedmatch = null;1069addThis();1070status = inSection(164);1071pattern = /ab\z/;1072string = 'b\nac\n';1073actualmatch = string.match(pattern);1074expectedmatch = null;1075addThis();1076status = inSection(165);1077pattern = /ab$/;1078string = 'b\nac\n';1079actualmatch = string.match(pattern);1080expectedmatch = null;1081addThis();1082status = inSection(166);1083pattern = /ab\Z/;1084string = 'b\nac';1085actualmatch = string.match(pattern);1086expectedmatch = null;1087addThis();1088status = inSection(167);1089pattern = /ab\z/;1090string = 'b\nac';1091actualmatch = string.match(pattern);1092expectedmatch = null;1093addThis();1094status = inSection(168);1095pattern = /ab$/;1096string = 'b\nac';1097actualmatch = string.match(pattern);1098expectedmatch = null;1099addThis();1100status = inSection(169);1101pattern = /ab\Z/m;1102string = 'ac\nb\n';1103actualmatch = string.match(pattern);1104expectedmatch = null;1105addThis();1106status = inSection(170);1107pattern = /ab\z/m;1108string = 'ac\nb\n';1109actualmatch = string.match(pattern);1110expectedmatch = null;1111addThis();1112status = inSection(171);1113pattern = /ab$/m;1114string = 'ac\nb\n';1115actualmatch = string.match(pattern);1116expectedmatch = null;1117addThis();1118status = inSection(172);1119pattern = /ab\Z/m;1120string = 'b\nac\n';1121actualmatch = string.match(pattern);1122expectedmatch = null;1123addThis();1124status = inSection(173);1125pattern = /ab\z/m;1126string = 'b\nac\n';1127actualmatch = string.match(pattern);1128expectedmatch = null;1129addThis();1130status = inSection(174);1131pattern = /ab$/m;1132string = 'b\nac\n';1133actualmatch = string.match(pattern);1134expectedmatch = null;1135addThis();1136status = inSection(175);1137pattern = /ab\Z/m;1138string = 'b\nac';1139actualmatch = string.match(pattern);1140expectedmatch = null;1141addThis();1142status = inSection(176);1143pattern = /ab\z/m;1144string = 'b\nac';1145actualmatch = string.match(pattern);1146expectedmatch = null;1147addThis();1148status = inSection(177);1149pattern = /ab$/m;1150string = 'b\nac';1151actualmatch = string.match(pattern);1152expectedmatch = null;1153addThis();1154status = inSection(178);1155pattern = /ab\Z/;1156string = 'ca\nb\n';1157actualmatch = string.match(pattern);1158expectedmatch = null;1159addThis();1160status = inSection(179);1161pattern = /ab\z/;1162string = 'ca\nb\n';1163actualmatch = string.match(pattern);1164expectedmatch = null;1165addThis();1166status = inSection(180);1167pattern = /ab$/;1168string = 'ca\nb\n';1169actualmatch = string.match(pattern);1170expectedmatch = null;1171addThis();1172status = inSection(181);1173pattern = /ab\Z/;1174string = 'b\nca\n';1175actualmatch = string.match(pattern);1176expectedmatch = null;1177addThis();1178status = inSection(182);1179pattern = /ab\z/;1180string = 'b\nca\n';1181actualmatch = string.match(pattern);1182expectedmatch = null;1183addThis();1184status = inSection(183);1185pattern = /ab$/;1186string = 'b\nca\n';1187actualmatch = string.match(pattern);1188expectedmatch = null;1189addThis();1190status = inSection(184);1191pattern = /ab\Z/;1192string = 'b\nca';1193actualmatch = string.match(pattern);1194expectedmatch = null;1195addThis();1196status = inSection(185);1197pattern = /ab\z/;1198string = 'b\nca';1199actualmatch = string.match(pattern);1200expectedmatch = null;1201addThis();1202status = inSection(186);1203pattern = /ab$/;1204string = 'b\nca';1205actualmatch = string.match(pattern);1206expectedmatch = null;1207addThis();1208status = inSection(187);1209pattern = /ab\Z/m;1210string = 'ca\nb\n';1211actualmatch = string.match(pattern);1212expectedmatch = null;1213addThis();1214status = inSection(188);1215pattern = /ab\z/m;1216string = 'ca\nb\n';1217actualmatch = string.match(pattern);1218expectedmatch = null;1219addThis();1220status = inSection(189);1221pattern = /ab$/m;1222string = 'ca\nb\n';1223actualmatch = string.match(pattern);1224expectedmatch = null;1225addThis();1226status = inSection(190);1227pattern = /ab\Z/m;1228string = 'b\nca\n';1229actualmatch = string.match(pattern);1230expectedmatch = null;1231addThis();1232status = inSection(191);1233pattern = /ab\z/m;1234string = 'b\nca\n';1235actualmatch = string.match(pattern);1236expectedmatch = null;1237addThis();1238status = inSection(192);1239pattern = /ab$/m;1240string = 'b\nca\n';1241actualmatch = string.match(pattern);1242expectedmatch = null;1243addThis();1244status = inSection(193);1245pattern = /ab\Z/m;1246string = 'b\nca';1247actualmatch = string.match(pattern);1248expectedmatch = null;1249addThis();1250status = inSection(194);1251pattern = /ab\z/m;1252string = 'b\nca';1253actualmatch = string.match(pattern);1254expectedmatch = null;1255addThis();1256status = inSection(195);1257pattern = /ab$/m;1258string = 'b\nca';1259actualmatch = string.match(pattern);1260expectedmatch = null;1261addThis();1262status = inSection(196);1263pattern = /abb\Z/;1264string = 'abb\nb\n';1265actualmatch = string.match(pattern);1266expectedmatch = null;1267addThis();1268status = inSection(197);1269pattern = /abb\z/;1270string = 'abb\nb\n';1271actualmatch = string.match(pattern);1272expectedmatch = null;1273addThis();1274status = inSection(198);1275pattern = /abb$/;1276string = 'abb\nb\n';1277actualmatch = string.match(pattern);1278expectedmatch = null;1279addThis();1280status = inSection(199);1281pattern = /abb\z/;1282string = 'b\nabb\n';1283actualmatch = string.match(pattern);1284expectedmatch = null;1285addThis();1286status = inSection(200);1287pattern = /abb\z/m;1288string = 'abb\nb\n';1289actualmatch = string.match(pattern);1290expectedmatch = null;1291addThis();1292status = inSection(201);1293pattern = /abb\z/m;1294string = 'b\nabb\n';1295actualmatch = string.match(pattern);1296expectedmatch = null;1297addThis();1298status = inSection(202);1299pattern = /abb\Z/;1300string = 'ac\nb\n';1301actualmatch = string.match(pattern);1302expectedmatch = null;1303addThis();1304status = inSection(203);1305pattern = /abb\z/;1306string = 'ac\nb\n';1307actualmatch = string.match(pattern);1308expectedmatch = null;1309addThis();1310status = inSection(204);1311pattern = /abb$/;1312string = 'ac\nb\n';1313actualmatch = string.match(pattern);1314expectedmatch = null;1315addThis();1316status = inSection(205);1317pattern = /abb\Z/;1318string = 'b\nac\n';1319actualmatch = string.match(pattern);1320expectedmatch = null;1321addThis();1322status = inSection(206);1323pattern = /abb\z/;1324string = 'b\nac\n';1325actualmatch = string.match(pattern);1326expectedmatch = null;1327addThis();1328status = inSection(207);1329pattern = /abb$/;1330string = 'b\nac\n';1331actualmatch = string.match(pattern);1332expectedmatch = null;1333addThis();1334status = inSection(208);1335pattern = /abb\Z/;1336string = 'b\nac';1337actualmatch = string.match(pattern);1338expectedmatch = null;1339addThis();1340status = inSection(209);1341pattern = /abb\z/;1342string = 'b\nac';1343actualmatch = string.match(pattern);1344expectedmatch = null;1345addThis();1346status = inSection(210);1347pattern = /abb$/;1348string = 'b\nac';1349actualmatch = string.match(pattern);1350expectedmatch = null;1351addThis();1352status = inSection(211);1353pattern = /abb\Z/m;1354string = 'ac\nb\n';1355actualmatch = string.match(pattern);1356expectedmatch = null;1357addThis();1358status = inSection(212);1359pattern = /abb\z/m;1360string = 'ac\nb\n';1361actualmatch = string.match(pattern);1362expectedmatch = null;1363addThis();1364status = inSection(213);1365pattern = /abb$/m;1366string = 'ac\nb\n';1367actualmatch = string.match(pattern);1368expectedmatch = null;1369addThis();1370status = inSection(214);1371pattern = /abb\Z/m;1372string = 'b\nac\n';1373actualmatch = string.match(pattern);1374expectedmatch = null;1375addThis();1376status = inSection(215);1377pattern = /abb\z/m;1378string = 'b\nac\n';1379actualmatch = string.match(pattern);1380expectedmatch = null;1381addThis();1382status = inSection(216);1383pattern = /abb$/m;1384string = 'b\nac\n';1385actualmatch = string.match(pattern);1386expectedmatch = null;1387addThis();1388status = inSection(217);1389pattern = /abb\Z/m;1390string = 'b\nac';1391actualmatch = string.match(pattern);1392expectedmatch = null;1393addThis();1394status = inSection(218);1395pattern = /abb\z/m;1396string = 'b\nac';1397actualmatch = string.match(pattern);1398expectedmatch = null;1399addThis();1400status = inSection(219);1401pattern = /abb$/m;1402string = 'b\nac';1403actualmatch = string.match(pattern);1404expectedmatch = null;1405addThis();1406status = inSection(220);1407pattern = /abb\Z/;1408string = 'ca\nb\n';1409actualmatch = string.match(pattern);1410expectedmatch = null;1411addThis();1412status = inSection(221);1413pattern = /abb\z/;1414string = 'ca\nb\n';1415actualmatch = string.match(pattern);1416expectedmatch = null;1417addThis();1418status = inSection(222);1419pattern = /abb$/;1420string = 'ca\nb\n';1421actualmatch = string.match(pattern);1422expectedmatch = null;1423addThis();1424status = inSection(223);1425pattern = /abb\Z/;1426string = 'b\nca\n';1427actualmatch = string.match(pattern);1428expectedmatch = null;1429addThis();1430status = inSection(224);1431pattern = /abb\z/;1432string = 'b\nca\n';1433actualmatch = string.match(pattern);1434expectedmatch = null;1435addThis();1436status = inSection(225);1437pattern = /abb$/;1438string = 'b\nca\n';1439actualmatch = string.match(pattern);1440expectedmatch = null;1441addThis();1442status = inSection(226);1443pattern = /abb\Z/;1444string = 'b\nca';1445actualmatch = string.match(pattern);1446expectedmatch = null;1447addThis();1448status = inSection(227);1449pattern = /abb\z/;1450string = 'b\nca';1451actualmatch = string.match(pattern);1452expectedmatch = null;1453addThis();1454status = inSection(228);1455pattern = /abb$/;1456string = 'b\nca';1457actualmatch = string.match(pattern);1458expectedmatch = null;1459addThis();1460status = inSection(229);1461pattern = /abb\Z/m;1462string = 'ca\nb\n';1463actualmatch = string.match(pattern);1464expectedmatch = null;1465addThis();1466status = inSection(230);1467pattern = /abb\z/m;1468string = 'ca\nb\n';1469actualmatch = string.match(pattern);1470expectedmatch = null;1471addThis();1472status = inSection(231);1473pattern = /abb$/m;1474string = 'ca\nb\n';1475actualmatch = string.match(pattern);1476expectedmatch = null;1477addThis();1478status = inSection(232);1479pattern = /abb\Z/m;1480string = 'b\nca\n';1481actualmatch = string.match(pattern);1482expectedmatch = null;1483addThis();1484status = inSection(233);1485pattern = /abb\z/m;1486string = 'b\nca\n';1487actualmatch = string.match(pattern);1488expectedmatch = null;1489addThis();1490status = inSection(234);1491pattern = /abb$/m;1492string = 'b\nca\n';1493actualmatch = string.match(pattern);1494expectedmatch = null;1495addThis();1496status = inSection(235);1497pattern = /abb\Z/m;1498string = 'b\nca';1499actualmatch = string.match(pattern);1500expectedmatch = null;1501addThis();1502status = inSection(236);1503pattern = /abb\z/m;1504string = 'b\nca';1505actualmatch = string.match(pattern);1506expectedmatch = null;1507addThis();1508status = inSection(237);1509pattern = /abb$/m;1510string = 'b\nca';1511actualmatch = string.match(pattern);1512expectedmatch = null;1513addThis();1514status = inSection(238);1515pattern = /a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz/;1516string = 'x';1517actualmatch = string.match(pattern);1518expectedmatch = null;1519addThis();1520status = inSection(239);1521pattern = /\GX.*X/;1522string = 'aaaXbX';1523actualmatch = string.match(pattern);1524expectedmatch = null;1525addThis();1526status = inSection(240);1527pattern = /\.c(pp|xx|c)?$/i;1528string = 'Changes';1529actualmatch = string.match(pattern);1530expectedmatch = null;1531addThis();1532status = inSection(241);1533pattern = /^([a-z]:)/;1534string = 'C:/';1535actualmatch = string.match(pattern);1536expectedmatch = null;1537addThis();1538status = inSection(242);1539pattern = /(\w)?(abc)\1b/;1540string = 'abcab';1541actualmatch = string.match(pattern);1542expectedmatch = null;1543addThis();1544/* ECMA doesn't support (?(1545 status = inSection(243);1546 pattern = /^(a)?(?(1)a|b)+$/;1547 string = 'a';1548 actualmatch = string.match(pattern);1549 expectedmatch = null;1550 addThis();1551*/1552//-----------------------------------------------------------------------------1553test();1554//-----------------------------------------------------------------------------1555function addThis()1556{1557 if(omitCurrentSection())1558 return;1559 statusmessages[i] = status;1560 patterns[i] = pattern;1561 strings[i] = string;1562 actualmatches[i] = actualmatch;1563 expectedmatches[i] = expectedmatch;1564 i++;1565}1566function omitCurrentSection()1567{1568 try1569 {1570 // current section number is in global status variable1571 var n = status.match(/(\d+)/)[1];1572 return ((n < cnLBOUND) || (n > cnUBOUND));1573 }1574 catch(e)1575 {1576 return false;1577 }1578}1579function test()1580{1581 enterFunc ('test');1582 printBugNumber(BUGNUMBER);1583 printStatus (summary);1584 testRegExp(statusmessages, patterns, strings, actualmatches, expectedmatches);1585 exitFunc ('test');...
chrome_project_list.py
Source:chrome_project_list.py
...3This file stores the Chrome project_list used in warn.py and4its dependencies. It has been put into this file for easier navigation and5unification of the Chrome and Android warn.py.6"""7def create_pattern(pattern):8 """Return a tuple of name and warn patten."""9 return [pattern, '(^|.*/)' + pattern + '/.*: warning:']10# A list of [project_name, file_path_pattern].11project_list = [12 create_pattern('android_webview'),13 create_pattern('apps'),14 create_pattern('ash/app_list'),15 create_pattern('ash/public'),16 create_pattern('ash/assistant'),17 create_pattern('ash/display'),18 create_pattern('ash/resources'),19 create_pattern('ash/login'),20 create_pattern('ash/system'),21 create_pattern('ash/wm'),22 create_pattern('ash/shelf'),23 create_pattern('ash'),24 create_pattern('base/trace_event'),25 create_pattern('base/debug'),26 create_pattern('base/third_party'),27 create_pattern('base/files'),28 create_pattern('base/test'),29 create_pattern('base/util'),30 create_pattern('base/task'),31 create_pattern('base/metrics'),32 create_pattern('base/strings'),33 create_pattern('base/memory'),34 create_pattern('base'),35 create_pattern('build'),36 create_pattern('build_overrides'),37 create_pattern('buildtools'),38 create_pattern('cc'),39 create_pattern('chrome/services'),40 create_pattern('chrome/app'),41 create_pattern('chrome/renderer'),42 create_pattern('chrome/test'),43 create_pattern('chrome/common/safe_browsing'),44 create_pattern('chrome/common/importer'),45 create_pattern('chrome/common/media_router'),46 create_pattern('chrome/common/extensions'),47 create_pattern('chrome/common'),48 create_pattern('chrome/browser/sync_file_system'),49 create_pattern('chrome/browser/safe_browsing'),50 create_pattern('chrome/browser/download'),51 create_pattern('chrome/browser/ui'),52 create_pattern('chrome/browser/supervised_user'),53 create_pattern('chrome/browser/search'),54 create_pattern('chrome/browser/browsing_data'),55 create_pattern('chrome/browser/predictors'),56 create_pattern('chrome/browser/net'),57 create_pattern('chrome/browser/devtools'),58 create_pattern('chrome/browser/resource_coordinator'),59 create_pattern('chrome/browser/page_load_metrics'),60 create_pattern('chrome/browser/extensions'),61 create_pattern('chrome/browser/ssl'),62 create_pattern('chrome/browser/printing'),63 create_pattern('chrome/browser/profiles'),64 create_pattern('chrome/browser/chromeos'),65 create_pattern('chrome/browser/performance_manager'),66 create_pattern('chrome/browser/metrics'),67 create_pattern('chrome/browser/component_updater'),68 create_pattern('chrome/browser/media'),69 create_pattern('chrome/browser/notifications'),70 create_pattern('chrome/browser/web_applications'),71 create_pattern('chrome/browser/media_galleries'),72 create_pattern('chrome/browser'),73 create_pattern('chrome'),74 create_pattern('chromecast'),75 create_pattern('chromeos/services'),76 create_pattern('chromeos/dbus'),77 create_pattern('chromeos/assistant'),78 create_pattern('chromeos/components'),79 create_pattern('chromeos/settings'),80 create_pattern('chromeos/constants'),81 create_pattern('chromeos/network'),82 create_pattern('chromeos'),83 create_pattern('cloud_print'),84 create_pattern('components/crash'),85 create_pattern('components/subresource_filter'),86 create_pattern('components/invalidation'),87 create_pattern('components/autofill'),88 create_pattern('components/onc'),89 create_pattern('components/arc'),90 create_pattern('components/safe_browsing'),91 create_pattern('components/services'),92 create_pattern('components/cast_channel'),93 create_pattern('components/download'),94 create_pattern('components/feed'),95 create_pattern('components/offline_pages'),96 create_pattern('components/bookmarks'),97 create_pattern('components/cloud_devices'),98 create_pattern('components/mirroring'),99 create_pattern('components/spellcheck'),100 create_pattern('components/viz'),101 create_pattern('components/gcm_driver'),102 create_pattern('components/ntp_snippets'),103 create_pattern('components/translate'),104 create_pattern('components/search_engines'),105 create_pattern('components/background_task_scheduler'),106 create_pattern('components/signin'),107 create_pattern('components/chromeos_camera'),108 create_pattern('components/reading_list'),109 create_pattern('components/assist_ranker'),110 create_pattern('components/payments'),111 create_pattern('components/feedback'),112 create_pattern('components/ui_devtools'),113 create_pattern('components/password_manager'),114 create_pattern('components/omnibox'),115 create_pattern('components/content_settings'),116 create_pattern('components/dom_distiller'),117 create_pattern('components/nacl'),118 create_pattern('components/metrics'),119 create_pattern('components/policy'),120 create_pattern('components/optimization_guide'),121 create_pattern('components/exo'),122 create_pattern('components/update_client'),123 create_pattern('components/data_reduction_proxy'),124 create_pattern('components/sync'),125 create_pattern('components/drive'),126 create_pattern('components/variations'),127 create_pattern('components/history'),128 create_pattern('components/webcrypto'),129 create_pattern('components'),130 create_pattern('content/public'),131 create_pattern('content/renderer'),132 create_pattern('content/test'),133 create_pattern('content/common'),134 create_pattern('content/browser'),135 create_pattern('content/zygote'),136 create_pattern('content'),137 create_pattern('courgette'),138 create_pattern('crypto'),139 create_pattern('dbus'),140 create_pattern('device/base'),141 create_pattern('device/vr'),142 create_pattern('device/gamepad'),143 create_pattern('device/test'),144 create_pattern('device/fido'),145 create_pattern('device/bluetooth'),146 create_pattern('device'),147 create_pattern('docs'),148 create_pattern('extensions/docs'),149 create_pattern('extensions/components'),150 create_pattern('extensions/buildflags'),151 create_pattern('extensions/renderer'),152 create_pattern('extensions/test'),153 create_pattern('extensions/common'),154 create_pattern('extensions/shell'),155 create_pattern('extensions/browser'),156 create_pattern('extensions/strings'),157 create_pattern('extensions'),158 create_pattern('fuchsia'),159 create_pattern('gin'),160 create_pattern('google_apis'),161 create_pattern('google_update'),162 create_pattern('gpu/perftests'),163 create_pattern('gpu/GLES2'),164 create_pattern('gpu/command_buffer'),165 create_pattern('gpu/tools'),166 create_pattern('gpu/gles2_conform_support'),167 create_pattern('gpu/ipc'),168 create_pattern('gpu/khronos_glcts_support'),169 create_pattern('gpu'),170 create_pattern('headless'),171 create_pattern('infra'),172 create_pattern('ipc'),173 create_pattern('jingle'),174 create_pattern('media'),175 create_pattern('mojo'),176 create_pattern('native_client'),177 create_pattern('ative_client_sdk'),178 create_pattern('net'),179 create_pattern('out'),180 create_pattern('pdf'),181 create_pattern('ppapi'),182 create_pattern('printing'),183 create_pattern('remoting'),184 create_pattern('rlz'),185 create_pattern('sandbox'),186 create_pattern('services/audio'),187 create_pattern('services/content'),188 create_pattern('services/data_decoder'),189 create_pattern('services/device'),190 create_pattern('services/file'),191 create_pattern('services/identity'),192 create_pattern('services/image_annotation'),193 create_pattern('services/media_session'),194 create_pattern('services/metrics'),195 create_pattern('services/network'),196 create_pattern('services/preferences'),197 create_pattern('services/proxy_resolver'),198 create_pattern('services/resource_coordinator'),199 create_pattern('services/service_manager'),200 create_pattern('services/shape_detection'),201 create_pattern('services/strings'),202 create_pattern('services/test'),203 create_pattern('services/tracing'),204 create_pattern('services/video_capture'),205 create_pattern('services/viz'),206 create_pattern('services/ws'),207 create_pattern('services'),208 create_pattern('skia/config'),209 create_pattern('skia/ext'),210 create_pattern('skia/public'),211 create_pattern('skia/tools'),212 create_pattern('skia'),213 create_pattern('sql'),214 create_pattern('storage'),215 create_pattern('styleguide'),216 create_pattern('testing'),217 create_pattern('third_party/Python-Markdown'),218 create_pattern('third_party/SPIRV-Tools'),219 create_pattern('third_party/abseil-cpp'),220 create_pattern('third_party/accessibility-audit'),221 create_pattern('third_party/accessibility_test_framework'),222 create_pattern('third_party/adobe'),223 create_pattern('third_party/afl'),224 create_pattern('third_party/android_build_tools'),225 create_pattern('third_party/android_crazy_linker'),226 create_pattern('third_party/android_data_chart'),227 create_pattern('third_party/android_deps'),228 create_pattern('third_party/android_media'),229 create_pattern('third_party/android_ndk'),230 create_pattern('third_party/android_opengl'),231 create_pattern('third_party/android_platform'),232 create_pattern('third_party/android_protobuf'),233 create_pattern('third_party/android_sdk'),234 create_pattern('third_party/android_support_test_runner'),235 create_pattern('third_party/android_swipe_refresh'),236 create_pattern('third_party/android_system_sdk'),237 create_pattern('third_party/android_tools'),238 create_pattern('third_party/angle'),239 create_pattern('third_party/apache-mac'),240 create_pattern('third_party/apache-portable-runtime'),241 create_pattern('third_party/apache-win32'),242 create_pattern('third_party/apk-patch-size-estimator'),243 create_pattern('third_party/apple_apsl'),244 create_pattern('third_party/arcore-android-sdk'),245 create_pattern('third_party/ashmem'),246 create_pattern('third_party/auto'),247 create_pattern('third_party/axe-core'),248 create_pattern('third_party/bazel'),249 create_pattern('third_party/binutils'),250 create_pattern('third_party/bison'),251 create_pattern('third_party/blanketjs'),252 create_pattern('third_party/blink/common'),253 create_pattern('third_party/blink/manual_tests'),254 create_pattern('third_party/blink/perf_tests'),255 create_pattern('third_party/blink/public/common'),256 create_pattern('third_party/blink/public/default_100_percent'),257 create_pattern('third_party/blink/public/default_200_percent'),258 create_pattern('third_party/blink/public/platform'),259 create_pattern('third_party/blink/public/mojom/ad_tagging'),260 create_pattern('third_party/blink/public/mojom/app_banner'),261 create_pattern('third_party/blink/public/mojom/appcache'),262 create_pattern('third_party/blink/public/mojom/array_buffer'),263 create_pattern('third_party/blink/public/mojom/associated_interfaces'),264 create_pattern('third_party/blink/public/mojom/autoplay'),265 create_pattern('third_party/blink/public/mojom/background_fetch'),266 create_pattern('third_party/blink/public/mojom/background_sync'),267 create_pattern('third_party/blink/public/mojom/badging'),268 create_pattern('third_party/blink/public/mojom/blob'),269 create_pattern('third_party/blink/public/mojom/bluetooth'),270 create_pattern('third_party/blink/public/mojom/broadcastchannel'),271 create_pattern('third_party/blink/public/mojom/cache_storage'),272 create_pattern('third_party/blink/public/mojom/choosers'),273 create_pattern('third_party/blink/public/mojom/clipboard'),274 create_pattern('third_party/blink/public/mojom/commit_result'),275 create_pattern('third_party/blink/public/mojom/contacts'),276 create_pattern('third_party/blink/public/mojom/cookie_store'),277 create_pattern('third_party/blink/public/mojom/crash'),278 create_pattern('third_party/blink/public/mojom/credentialmanager'),279 create_pattern('third_party/blink/public/mojom/csp'),280 create_pattern('third_party/blink/public/mojom/devtools'),281 create_pattern('third_party/blink/public/mojom/document_metadata'),282 create_pattern('third_party/blink/public/mojom/dom_storage'),283 create_pattern('third_party/blink/public/mojom/dwrite_font_proxy'),284 create_pattern('third_party/blink/public/mojom/feature_policy'),285 create_pattern('third_party/blink/public/mojom/fetch'),286 create_pattern('third_party/blink/public/mojom/file'),287 create_pattern('third_party/blink/public/mojom/filesystem'),288 create_pattern('third_party/blink/public/mojom/font_unique_name_lookup'),289 create_pattern('third_party/blink/public/mojom/frame'),290 create_pattern('third_party/blink/public/mojom/frame_sinks'),291 create_pattern('third_party/blink/public/mojom/geolocation'),292 create_pattern('third_party/blink/public/mojom/hyphenation'),293 create_pattern('third_party/blink/public/mojom/idle'),294 create_pattern('third_party/blink/public/mojom/indexeddb'),295 create_pattern('third_party/blink/public/mojom/input'),296 create_pattern('third_party/blink/public/mojom/insecure_input'),297 create_pattern('third_party/blink/public/mojom/installation'),298 create_pattern('third_party/blink/public/mojom/installedapp'),299 create_pattern('third_party/blink/public/mojom/keyboard_lock'),300 create_pattern('third_party/blink/public/mojom/leak_detector'),301 create_pattern('third_party/blink/public/mojom/loader'),302 create_pattern('third_party/blink/public/mojom/locks'),303 create_pattern('third_party/blink/public/mojom/manifest'),304 create_pattern('third_party/blink/public/mojom/media_controls'),305 create_pattern('third_party/blink/public/mojom/mediasession'),306 create_pattern('third_party/blink/public/mojom/mediastream'),307 create_pattern('third_party/blink/public/mojom/messaging'),308 create_pattern('third_party/blink/public/mojom/mime'),309 create_pattern('third_party/blink/public/mojom/native_file_system'),310 create_pattern('third_party/blink/public/mojom/net'),311 create_pattern('third_party/blink/public/mojom/notifications'),312 create_pattern('third_party/blink/public/mojom/oom_intervention'),313 create_pattern('third_party/blink/public/mojom/page'),314 create_pattern('third_party/blink/public/mojom/payments'),315 create_pattern('third_party/blink/public/mojom/permissions'),316 create_pattern('third_party/blink/public/mojom/picture_in_picture'),317 create_pattern('third_party/blink/public/mojom/plugins'),318 create_pattern('third_party/blink/public/mojom/portal'),319 create_pattern('third_party/blink/public/mojom/presentation'),320 create_pattern('third_party/blink/public/mojom/push_messaging'),321 create_pattern('third_party/blink/public/mojom/quota'),322 create_pattern('third_party/blink/public/mojom/remote_objects'),323 create_pattern('third_party/blink/public/mojom/reporting'),324 create_pattern('third_party/blink/public/mojom/script'),325 create_pattern('third_party/blink/public/mojom/selection_menu'),326 create_pattern('third_party/blink/public/mojom/serial'),327 create_pattern('third_party/blink/public/mojom/service_worker'),328 create_pattern('third_party/blink/public/mojom/site_engagement'),329 create_pattern('third_party/blink/public/mojom/sms'),330 create_pattern('third_party/blink/public/mojom/speech'),331 create_pattern('third_party/blink/public/mojom/ukm'),332 create_pattern('third_party/blink/public/mojom/unhandled_tap_notifier'),333 create_pattern('third_party/blink/public/mojom/usb'),334 create_pattern('third_party/blink/public/mojom/use_counter'),335 create_pattern('third_party/blink/public/mojom/user_agent'),336 create_pattern('third_party/blink/public/mojom/wake_lock'),337 create_pattern('third_party/blink/public/mojom/web_client_hints'),338 create_pattern('third_party/blink/public/mojom/web_feature'),339 create_pattern('third_party/blink/public/mojom/webaudio'),340 create_pattern('third_party/blink/public/mojom/webauthn'),341 create_pattern('third_party/blink/public/mojom/webdatabase'),342 create_pattern('third_party/blink/public/mojom/webshare'),343 create_pattern('third_party/blink/public/mojom/window_features'),344 create_pattern('third_party/blink/public/mojom/worker'),345 create_pattern('third_party/blink/public/web'),346 create_pattern('third_party/blink/renderer/bindings'),347 create_pattern('third_party/blink/renderer/build'),348 create_pattern('third_party/blink/renderer/controller'),349 create_pattern('third_party/blink/renderer/core/accessibility'),350 create_pattern('third_party/blink/renderer/core/animation'),351 create_pattern('third_party/blink/renderer/core/aom'),352 create_pattern('third_party/blink/renderer/core/clipboard'),353 create_pattern('third_party/blink/renderer/core/content_capture'),354 create_pattern('third_party/blink/renderer/core/context_features'),355 create_pattern('third_party/blink/renderer/core/css'),356 create_pattern('third_party/blink/renderer/core/display_lock'),357 create_pattern('third_party/blink/renderer/core/dom'),358 create_pattern('third_party/blink/renderer/core/editing'),359 create_pattern('third_party/blink/renderer/core/events'),360 create_pattern('third_party/blink/renderer/core/execution_context'),361 create_pattern('third_party/blink/renderer/core/exported'),362 create_pattern('third_party/blink/renderer/core/feature_policy'),363 create_pattern('third_party/blink/renderer/core/fetch'),364 create_pattern('third_party/blink/renderer/core/fileapi'),365 create_pattern('third_party/blink/renderer/core/frame'),366 create_pattern('third_party/blink/renderer/core/fullscreen'),367 create_pattern('third_party/blink/renderer/core/geometry'),368 create_pattern('third_party/blink/renderer/core/html'),369 create_pattern('third_party/blink/renderer/core/imagebitmap'),370 create_pattern('third_party/blink/renderer/core/input'),371 create_pattern('third_party/blink/renderer/core/inspector'),372 create_pattern('third_party/blink/renderer/core/intersection_observer'),373 create_pattern('third_party/blink/renderer/core/invisible_dom'),374 create_pattern('third_party/blink/renderer/core/layout'),375 create_pattern('third_party/blink/renderer/core/loader'),376 create_pattern('third_party/blink/renderer/core/messaging'),377 create_pattern('third_party/blink/renderer/core/mojo'),378 create_pattern('third_party/blink/renderer/core/offscreencanvas'),379 create_pattern('third_party/blink/renderer/core/origin_trials'),380 create_pattern('third_party/blink/renderer/core/page'),381 create_pattern('third_party/blink/renderer/core/paint'),382 create_pattern('third_party/blink/renderer/core/probe'),383 create_pattern('third_party/blink/renderer/core/resize_observer'),384 create_pattern('third_party/blink/renderer/core/scheduler'),385 create_pattern('third_party/blink/renderer/core/script'),386 create_pattern('third_party/blink/renderer/core/scroll'),387 create_pattern('third_party/blink/renderer/core/streams'),388 create_pattern('third_party/blink/renderer/core/style'),389 create_pattern('third_party/blink/renderer/core/svg'),390 create_pattern('third_party/blink/renderer/core/testing'),391 create_pattern('third_party/blink/renderer/core/timezone'),392 create_pattern('third_party/blink/renderer/core/timing'),393 create_pattern('third_party/blink/renderer/core/trustedtypes'),394 create_pattern('third_party/blink/renderer/core/typed_arrays'),395 create_pattern('third_party/blink/renderer/core/url'),396 create_pattern('third_party/blink/renderer/core/win'),397 create_pattern('third_party/blink/renderer/core/workers'),398 create_pattern('third_party/blink/renderer/core/xml'),399 create_pattern('third_party/blink/renderer/core/xmlhttprequest'),400 create_pattern('third_party/blink/renderer/devtools'),401 create_pattern('third_party/blink/renderer/modules'),402 create_pattern('third_party/blink/renderer/platform'),403 create_pattern('third_party/blink/tools'),404 create_pattern('third_party/blink/web_tests'),405 create_pattern('third_party/boringssl'),406 create_pattern('third_party/bouncycastle'),407 create_pattern('third_party/breakpad'),408 create_pattern('third_party/brotli'),409 create_pattern('third_party/bspatch'),410 create_pattern('third_party/byte_buddy'),411 create_pattern('third_party/cacheinvalidation'),412 create_pattern('third_party/catapult'),413 create_pattern('third_party/cct_dynamic_module'),414 create_pattern('third_party/ced'),415 create_pattern('third_party/chaijs'),416 create_pattern('third_party/checkstyle'),417 create_pattern('third_party/chromevox'),418 create_pattern('third_party/chromite'),419 create_pattern('third_party/cld_3'),420 create_pattern('third_party/closure_compiler'),421 create_pattern('third_party/colorama'),422 create_pattern('third_party/crashpad'),423 create_pattern('third_party/crc32c'),424 create_pattern('third_party/cros_system_api'),425 create_pattern('third_party/custom_tabs_client'),426 create_pattern('third_party/d3'),427 create_pattern('third_party/dav1d'),428 create_pattern('third_party/dawn'),429 create_pattern('third_party/decklink'),430 create_pattern('third_party/depot_tools'),431 create_pattern('third_party/devscripts'),432 create_pattern('third_party/devtools-node-modules'),433 create_pattern('third_party/dom_distiller_js'),434 create_pattern('third_party/elfutils'),435 create_pattern('third_party/emoji-segmenter'),436 create_pattern('third_party/errorprone'),437 create_pattern('third_party/espresso'),438 create_pattern('third_party/expat'),439 create_pattern('third_party/feed'),440 create_pattern('third_party/ffmpeg'),441 create_pattern('third_party/flac'),442 create_pattern('third_party/flatbuffers'),443 create_pattern('third_party/flot'),444 create_pattern('third_party/fontconfig'),445 create_pattern('third_party/freetype'),446 create_pattern('third_party/fuchsia-sdk'),447 create_pattern('third_party/gestures'),448 create_pattern('third_party/gif_player'),449 create_pattern('third_party/glfw'),450 create_pattern('third_party/glslang'),451 create_pattern('third_party/gnu_binutils'),452 create_pattern('third_party/google-truth'),453 create_pattern('third_party/google_android_play_core'),454 create_pattern('third_party/google_appengine_cloudstorage'),455 create_pattern('third_party/google_input_tools'),456 create_pattern('third_party/google_toolbox_for_mac'),457 create_pattern('third_party/google_trust_services'),458 create_pattern('third_party/googletest'),459 create_pattern('third_party/gperf'),460 create_pattern('third_party/gradle_wrapper'),461 create_pattern('third_party/grpc'),462 create_pattern('third_party/gson'),463 create_pattern('third_party/guava'),464 create_pattern('third_party/gvr-android-keyboard'),465 create_pattern('third_party/gvr-android-sdk'),466 create_pattern('third_party/hamcrest'),467 create_pattern('third_party/harfbuzz-ng'),468 create_pattern('third_party/hunspell'),469 create_pattern('third_party/hunspell_dictionaries'),470 create_pattern('third_party/iaccessible2'),471 create_pattern('third_party/iccjpeg'),472 create_pattern('third_party/icu/android'),473 create_pattern('third_party/icu/android_small'),474 create_pattern('third_party/icu/cast'),475 create_pattern('third_party/icu/chromeos'),476 create_pattern('third_party/icu/common'),477 create_pattern('third_party/icu/filters'),478 create_pattern('third_party/icu/flutter'),479 create_pattern('third_party/icu/fuzzers'),480 create_pattern('third_party/icu/ios'),481 create_pattern('third_party/icu/patches'),482 create_pattern('third_party/icu/scripts'),483 create_pattern('third_party/icu/source'),484 create_pattern('third_party/icu/tzres'),485 create_pattern('third_party/icu4j'),486 create_pattern('third_party/ijar'),487 create_pattern('third_party/ink'),488 create_pattern('third_party/inspector_protocol'),489 create_pattern('third_party/instrumented_libraries'),490 create_pattern('third_party/intellij'),491 create_pattern('third_party/isimpledom'),492 create_pattern('third_party/jacoco'),493 create_pattern('third_party/jinja2'),494 create_pattern('third_party/jsoncpp'),495 create_pattern('third_party/jsr-305'),496 create_pattern('third_party/jstemplate'),497 create_pattern('third_party/junit'),498 create_pattern('third_party/khronos'),499 create_pattern('third_party/lcov'),500 create_pattern('third_party/leveldatabase'),501 create_pattern('third_party/libFuzzer'),502 create_pattern('third_party/libXNVCtrl'),503 create_pattern('third_party/libaddressinput'),504 create_pattern('third_party/libaom'),505 create_pattern('third_party/libcxx-pretty-printers'),506 create_pattern('third_party/libdrm'),507 create_pattern('third_party/libevdev'),508 create_pattern('third_party/libjingle_xmpp'),509 create_pattern('third_party/libjpeg'),510 create_pattern('third_party/libjpeg_turbo'),511 create_pattern('third_party/liblouis'),512 create_pattern('third_party/libovr'),513 create_pattern('third_party/libphonenumber'),514 create_pattern('third_party/libpng'),515 create_pattern('third_party/libprotobuf-mutator'),516 create_pattern('third_party/libsecret'),517 create_pattern('third_party/libsrtp'),518 create_pattern('third_party/libsync'),519 create_pattern('third_party/libudev'),520 create_pattern('third_party/libusb'),521 create_pattern('third_party/libvpx'),522 create_pattern('third_party/libwebm'),523 create_pattern('third_party/libwebp'),524 create_pattern('third_party/libxml'),525 create_pattern('third_party/libxslt'),526 create_pattern('third_party/libyuv'),527 create_pattern('third_party/lighttpd'),528 create_pattern('third_party/logilab'),529 create_pattern('third_party/lss'),530 create_pattern('third_party/lzma_sdk'),531 create_pattern('third_party/mach_override'),532 create_pattern('third_party/markdown'),533 create_pattern('third_party/markupsafe'),534 create_pattern('third_party/material_design_icons'),535 create_pattern('third_party/mesa_headers'),536 create_pattern('third_party/metrics_proto'),537 create_pattern('third_party/microsoft_webauthn'),538 create_pattern('third_party/mingw-w64'),539 create_pattern('third_party/minigbm'),540 create_pattern('third_party/minizip'),541 create_pattern('third_party/mocha'),542 create_pattern('third_party/mockito'),543 create_pattern('third_party/modp_b64'),544 create_pattern('third_party/motemplate'),545 create_pattern('third_party/mozilla'),546 create_pattern('third_party/nacl_sdk_binaries'),547 create_pattern('third_party/nasm'),548 create_pattern('third_party/netty-tcnative'),549 create_pattern('third_party/netty4'),550 create_pattern('third_party/node'),551 create_pattern('third_party/nvml'),552 create_pattern('third_party/objenesis'),553 create_pattern('third_party/ocmock'),554 create_pattern('third_party/openh264'),555 create_pattern('third_party/openscreen'),556 create_pattern('third_party/openvr'),557 create_pattern('third_party/opus'),558 create_pattern('third_party/ots'),559 create_pattern('third_party/ow2_asm'),560 create_pattern('third_party/pdfium'),561 create_pattern('third_party/pefile'),562 create_pattern('third_party/perfetto'),563 create_pattern('third_party/perl'),564 create_pattern('third_party/pexpect'),565 create_pattern('third_party/pffft'),566 create_pattern('third_party/ply'),567 create_pattern('third_party/polymer'),568 create_pattern('third_party/proguard'),569 create_pattern('third_party/protobuf'),570 create_pattern('third_party/protoc_javalite'),571 create_pattern('third_party/pycoverage'),572 create_pattern('third_party/pyelftools'),573 create_pattern('third_party/pyjson5'),574 create_pattern('third_party/pylint'),575 create_pattern('third_party/pymock'),576 create_pattern('third_party/pystache'),577 create_pattern('third_party/pywebsocket'),578 create_pattern('third_party/qcms'),579 create_pattern('third_party/quic_trace'),580 create_pattern('third_party/qunit'),581 create_pattern('third_party/r8'),582 create_pattern('third_party/re2'),583 create_pattern('third_party/requests'),584 create_pattern('third_party/rnnoise'),585 create_pattern('third_party/robolectric'),586 create_pattern('third_party/s2cellid'),587 create_pattern('third_party/sfntly'),588 create_pattern('third_party/shaderc'),589 create_pattern('third_party/simplejson'),590 create_pattern('third_party/sinonjs'),591 create_pattern('third_party/skia'),592 create_pattern('third_party/smhasher'),593 create_pattern('third_party/snappy'),594 create_pattern('third_party/speech-dispatcher'),595 create_pattern('third_party/spirv-cross'),596 create_pattern('third_party/spirv-headers'),597 create_pattern('third_party/sqlite'),598 create_pattern('third_party/sqlite4java'),599 create_pattern('third_party/sudden_motion_sensor'),600 create_pattern('third_party/swiftshader'),601 create_pattern('third_party/tcmalloc'),602 create_pattern('third_party/test_fonts'),603 create_pattern('third_party/tlslite'),604 create_pattern('third_party/ub-uiautomator'),605 create_pattern('third_party/unrar'),606 create_pattern('third_party/usb_ids'),607 create_pattern('third_party/usrsctp'),608 create_pattern('third_party/v4l-utils'),609 create_pattern('third_party/vulkan'),610 create_pattern('third_party/wayland'),611 create_pattern('third_party/wayland-protocols'),612 create_pattern('third_party/wds'),613 create_pattern('third_party/web-animations-js'),614 create_pattern('third_party/webdriver'),615 create_pattern('third_party/webgl'),616 create_pattern('third_party/webrtc'),617 create_pattern('third_party/webrtc_overrides'),618 create_pattern('third_party/webxr_test_pages'),619 create_pattern('third_party/widevine'),620 create_pattern('third_party/win_build_output'),621 create_pattern('third_party/woff2'),622 create_pattern('third_party/wtl'),623 create_pattern('third_party/xdg-utils'),624 create_pattern('third_party/xstream'),625 create_pattern('third_party/yasm'),626 create_pattern('third_party/zlib'),627 create_pattern('tools'),628 create_pattern('ui/accelerated_widget_mac'),629 create_pattern('ui/accessibility'),630 create_pattern('ui/android'),631 create_pattern('ui/aura'),632 create_pattern('ui/aura_extra'),633 create_pattern('ui/base'),634 create_pattern('ui/chromeos'),635 create_pattern('ui/compositor'),636 create_pattern('ui/compositor_extra'),637 create_pattern('ui/content_accelerators'),638 create_pattern('ui/display'),639 create_pattern('ui/events'),640 create_pattern('ui/file_manager'),641 create_pattern('ui/gfx'),642 create_pattern('ui/gl'),643 create_pattern('ui/latency'),644 create_pattern('ui/login'),645 create_pattern('ui/message_center'),646 create_pattern('ui/native_theme'),647 create_pattern('ui/ozone'),648 create_pattern('ui/platform_window'),649 create_pattern('ui/resources'),650 create_pattern('ui/shell_dialogs'),651 create_pattern('ui/snapshot'),652 create_pattern('ui/strings'),653 create_pattern('ui/surface'),654 create_pattern('ui/touch_selection'),655 create_pattern('ui/views'),656 create_pattern('ui/views_bridge_mac'),657 create_pattern('ui/views_content_client'),658 create_pattern('ui/web_dialogs'),659 create_pattern('ui/webui'),660 create_pattern('ui/wm'),661 create_pattern('url'),662 create_pattern('v8/benchmarks'),663 create_pattern('v8/build_overrides'),664 create_pattern('v8/custom_deps'),665 create_pattern('v8/docs'),666 create_pattern('v8/gni'),667 create_pattern('v8/include'),668 create_pattern('v8/infra'),669 create_pattern('v8/samples'),670 create_pattern('v8/src'),671 create_pattern('v8/test'),672 create_pattern('v8/testing'),673 create_pattern('v8/third_party'),674 create_pattern('v8/tools'),675 # keep out/obj and other patterns at the end.676 [677 'out/obj', '.*/(gen|obj[^/]*)/(include|EXECUTABLES|SHARED_LIBRARIES|'678 'STATIC_LIBRARIES|NATIVE_TESTS)/.*: warning:'679 ],680 ['other', '.*'] # all other unrecognized patterns...
android_project_list.py
Source:android_project_list.py
...12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.13# See the License for the specific language governing permissions and14# limitations under the License.15"""Define a project list to sort warnings by project directory path."""16def create_pattern(name, pattern=None):17 """Return a tuple of name and warn patten."""18 if pattern is not None:19 return [name, '(^|.*/)' + pattern + '/.*: warning:']20 return [name, '(^|.*/)' + name + '/.*: warning:']21# A list of [project_name, file_path_pattern].22# project_name should not contain comma, to be used in CSV output.23project_list = [24 create_pattern('art'),25 create_pattern('bionic'),26 create_pattern('bootable'),27 create_pattern('build'),28 create_pattern('cts'),29 create_pattern('dalvik'),30 create_pattern('developers'),31 create_pattern('development'),32 create_pattern('device'),33 create_pattern('doc'),34 # match external/google* before external/35 create_pattern('external/google', 'external/google.*'),36 create_pattern('external/non-google', 'external'),37 create_pattern('frameworks/av/camera'),38 create_pattern('frameworks/av/cmds'),39 create_pattern('frameworks/av/drm'),40 create_pattern('frameworks/av/include'),41 create_pattern('frameworks/av/media/img_utils'),42 create_pattern('frameworks/av/media/libcpustats'),43 create_pattern('frameworks/av/media/libeffects'),44 create_pattern('frameworks/av/media/libmediaplayerservice'),45 create_pattern('frameworks/av/media/libmedia'),46 create_pattern('frameworks/av/media/libstagefright'),47 create_pattern('frameworks/av/media/mtp'),48 create_pattern('frameworks/av/media/ndk'),49 create_pattern('frameworks/av/media/utils'),50 create_pattern('frameworks/av/media/Other', 'frameworks/av/media'),51 create_pattern('frameworks/av/radio'),52 create_pattern('frameworks/av/services'),53 create_pattern('frameworks/av/soundtrigger'),54 create_pattern('frameworks/av/Other', 'frameworks/av'),55 create_pattern('frameworks/base/cmds'),56 create_pattern('frameworks/base/core'),57 create_pattern('frameworks/base/drm'),58 create_pattern('frameworks/base/media'),59 create_pattern('frameworks/base/libs'),60 create_pattern('frameworks/base/native'),61 create_pattern('frameworks/base/packages'),62 create_pattern('frameworks/base/rs'),63 create_pattern('frameworks/base/services'),64 create_pattern('frameworks/base/tests'),65 create_pattern('frameworks/base/tools'),66 create_pattern('frameworks/base/Other', 'frameworks/base'),67 create_pattern('frameworks/compile/libbcc'),68 create_pattern('frameworks/compile/mclinker'),69 create_pattern('frameworks/compile/slang'),70 create_pattern('frameworks/compile/Other', 'frameworks/compile'),71 create_pattern('frameworks/minikin'),72 create_pattern('frameworks/ml'),73 create_pattern('frameworks/native/cmds'),74 create_pattern('frameworks/native/include'),75 create_pattern('frameworks/native/libs'),76 create_pattern('frameworks/native/opengl'),77 create_pattern('frameworks/native/services'),78 create_pattern('frameworks/native/vulkan'),79 create_pattern('frameworks/native/Other', 'frameworks/native'),80 create_pattern('frameworks/opt'),81 create_pattern('frameworks/rs'),82 create_pattern('frameworks/webview'),83 create_pattern('frameworks/wilhelm'),84 create_pattern('frameworks/Other', 'frameworks'),85 create_pattern('hardware/akm'),86 create_pattern('hardware/broadcom'),87 create_pattern('hardware/google'),88 create_pattern('hardware/intel'),89 create_pattern('hardware/interfaces'),90 create_pattern('hardware/libhardware'),91 create_pattern('hardware/libhardware_legacy'),92 create_pattern('hardware/qcom'),93 create_pattern('hardware/ril'),94 create_pattern('hardware/Other', 'hardware'),95 create_pattern('kernel'),96 create_pattern('libcore'),97 create_pattern('libnativehelper'),98 create_pattern('ndk'),99 # match vendor/unbungled_google/packages before other packages100 create_pattern('unbundled_google'),101 create_pattern('packages/providers/MediaProvider'),102 create_pattern('packages'),103 create_pattern('pdk'),104 create_pattern('prebuilts'),105 create_pattern('system/bt'),106 create_pattern('system/connectivity'),107 create_pattern('system/core/adb'),108 create_pattern('system/libbase'),109 create_pattern('system/core/debuggerd'),110 create_pattern('system/core/fastboot'),111 create_pattern('system/core/fingerprintd'),112 create_pattern('system/core/fs_mgr'),113 create_pattern('system/core/gatekeeperd'),114 create_pattern('system/core/healthd'),115 create_pattern('system/core/include'),116 create_pattern('system/core/init'),117 create_pattern('system/unwinding/libbacktrace'),118 create_pattern('system/logging/liblog'),119 create_pattern('system/core/libpixelflinger'),120 create_pattern('system/core/libprocessgroup'),121 create_pattern('system/core/libsysutils'),122 create_pattern('system/core/logcat'),123 create_pattern('system/core/logd'),124 create_pattern('system/core/run-as'),125 create_pattern('system/core/sdcard'),126 create_pattern('system/core/toolbox'),127 create_pattern('system/core/Other', 'system/core'),128 create_pattern('system/extras/ANRdaemon'),129 create_pattern('system/extras/cpustats'),130 create_pattern('system/extras/crypto-perf'),131 create_pattern('system/extras/ext4_utils'),132 create_pattern('system/extras/f2fs_utils'),133 create_pattern('system/extras/iotop'),134 create_pattern('system/extras/libfec'),135 create_pattern('system/extras/memory_replay'),136 create_pattern('system/extras/mmap-perf'),137 create_pattern('system/extras/multinetwork'),138 create_pattern('system/extras/perfprofd'),139 create_pattern('system/extras/procrank'),140 create_pattern('system/extras/runconuid'),141 create_pattern('system/extras/showmap'),142 create_pattern('system/extras/simpleperf'),143 create_pattern('system/extras/su'),144 create_pattern('system/extras/tests'),145 create_pattern('system/extras/verity'),146 create_pattern('system/extras/Other', 'system/extras'),147 create_pattern('system/gatekeeper'),148 create_pattern('system/keymaster'),149 create_pattern('system/libhidl'),150 create_pattern('system/libhwbinder'),151 create_pattern('system/media'),152 create_pattern('system/netd'),153 create_pattern('system/nvram'),154 create_pattern('system/security'),155 create_pattern('system/sepolicy'),156 create_pattern('system/tools'),157 create_pattern('system/update_engine'),158 create_pattern('system/vold'),159 create_pattern('system/Other', 'system'),160 create_pattern('toolchain'),161 create_pattern('test'),162 create_pattern('tools'),163 # match vendor/google* before vendor/164 create_pattern('vendor/google', 'vendor/google.*'),165 create_pattern('vendor/non-google', 'vendor'),166 # keep out/obj and other patterns at the end.167 [168 'out/obj', '.*/(gen|obj[^/]*)/(include|EXECUTABLES|SHARED_LIBRARIES|'169 'STATIC_LIBRARIES|NATIVE_TESTS)/.*: warning:'170 ],171 ['other', '.*'] # all other unrecognized patterns...
urls.py
Source:urls.py
...22 elif isinstance(pattern, RegexURLPattern):23 warnings.extend(check_pattern_name(pattern))24 warnings.extend(check_pattern_startswith_slash(pattern))25 return warnings26def describe_pattern(pattern):27 """28 Format the URL pattern for display in warning messages.29 """30 description = "'{}'".format(pattern.regex.pattern)31 if getattr(pattern, 'name', False):32 description += " [name='{}']".format(pattern.name)33 return description34def check_include_trailing_dollar(pattern):35 """36 Check that include is not used with a regex ending with a dollar.37 """38 regex_pattern = pattern.regex.pattern39 if regex_pattern.endswith('$') and not regex_pattern.endswith('\$'):40 warning = Warning(41 "Your URL pattern {} uses include with a regex ending with a '$'. "42 "Remove the dollar from the regex to avoid problems including "43 "URLs.".format(describe_pattern(pattern)),44 id="urls.W001",45 )46 return [warning]47 else:48 return []49def check_pattern_startswith_slash(pattern):50 """51 Check that the pattern does not begin with a forward slash.52 """53 regex_pattern = pattern.regex.pattern54 if regex_pattern.startswith('/') or regex_pattern.startswith('^/'):55 warning = Warning(56 "Your URL pattern {} has a regex beginning with a '/'. "57 "Remove this slash as it is unnecessary.".format(describe_pattern(pattern)),58 id="urls.W002",59 )60 return [warning]61 else:62 return []63def check_pattern_name(pattern):64 """65 Check that the pattern name does not contain a colon.66 """67 if pattern.name is not None and ":" in pattern.name:68 warning = Warning(69 "Your URL pattern {} has a name including a ':'. Remove the colon, to "70 "avoid ambiguous namespace references.".format(describe_pattern(pattern)),71 id="urls.W003",72 )73 return [warning]74 else:...
Using AI Code Generation
1import { addDecorator } from '@storybook/react';2import { withRootDecorator } from 'storybook-root-decorator';3import { withInfo } from '@storybook/addon-info';4import { withKnobs } from '@storybook/addon-knobs';5import { withA11y } from '@storybook/addon-a11y';6addDecorator(withInfo);7addDecorator(withKnobs);8addDecorator(withA11y);9addDecorator(withRootDecorator);10storiesOf('MyComponent', module)11 .add('default', () => <MyComponent />);12storiesOf('MyComponent', module)13 .add('with props', () => <MyComponent prop1="value1" prop2="value2" />);14storiesOf('MyComponent', module)15 .add('with children', () => <MyComponent><div>child1</div><div>child2</div></MyComponent>);16storiesOf('MyComponent', module)17 .add('with children and props', () => <MyComponent prop1="value1" prop2="value2"><div>child1</div><div>child2</div></MyComponent>);18storiesOf('MyComponent', module)19 .add('with children and props', () => <MyComponent prop1="value1" prop2="value2"><div>child1</div><div>child2</div></MyComponent>);20storiesOf('MyComponent', module)21 .add('with children and props', () => <MyComponent prop1="value1" prop2="value2"><div>child1</div><div>child2</div></MyComponent>);22storiesOf('MyComponent', module)23 .add('with children and props', () => <MyComponent prop1="value1" prop2="value2"><div>child1</div><div>child2</div></MyComponent>);24storiesOf('MyComponent', module)25 .add('with children and props', () => <MyComponent prop1="value1" prop2="value2"><div>child1</div><div>child2</div></MyComponent>);26storiesOf('MyComponent',
Using AI Code Generation
1import { pattern } from 'storybook-root';2import { pattern } from 'storybook-subfolder';3import { pattern } from '../storybook-root';4import { pattern } from '../storybook-subfolder';5import { pattern } from './storybook-root';6import { pattern } from './storybook-subfolder';7import { pattern } from '/storybook-root';8import { pattern } from '/storybook-subfolder';9import { pattern } from './storybook-root';10import { pattern } from './storybook-subfolder';11import { pattern } from 'storybook-root';12import { pattern } from 'storybook-subfolder';13import { pattern } from './storybook-root';14import { pattern } from './storybook-subfolder';15import { pattern } from 'storybook-root';16import { pattern } from 'storybook-subfolder';17import { pattern } from 'storybook-root';18import { pattern } from 'storybook-subfolder';19import { pattern } from 'storybook-root';20import { pattern } from 'storybook-subfolder';21import { pattern } from 'storybook-root';
Using AI Code Generation
1import { storiesOf } from 'storybook-root';2import React from 'react';3import { Text } from 'react-native';4const stories = storiesOf('Test', module);5stories.add('test', () => <Text>Test</Text>);6import { storiesOf } from 'storybook-root';7import React from 'react';8import { Text } from 'react-native';9const stories = storiesOf('Test', module);10stories.add('test', () => <Text>Test</Text>);11import { storiesOf } from 'storybook-root';12import React from 'react';13import { Text } from 'react-native';14const stories = storiesOf('Test', module);15stories.add('test', () => <Text>Test</Text>);16import { storiesOf } from 'storybook-root';17import React from 'react';18import { Text } from 'react-native';19const stories = storiesOf('Test', module);20stories.add('test', () => <Text>Test</Text>);21import { storiesOf } from 'storybook-root';22import React from 'react';23import { Text } from 'react-native';24const stories = storiesOf('Test', module);25stories.add('test', () => <Text>Test</Text>);26import { storiesOf } from 'storybook-root';27import React from 'react';28import { Text } from 'react-native';29const stories = storiesOf('Test', module);30stories.add('test', () => <Text>Test</Text>);31import { storiesOf } from 'storybook-root';32import React from 'react';33import { Text } from 'react-native';34const stories = storiesOf('Test', module);35stories.add('test', () => <Text>Test</Text>);36import { storiesOf } from 'storybook-root';37import React from 'react';38import { Text } from 'react-native';39const stories = storiesOf('Test', module);40stories.add('test', () => <Text>Test</Text>);41import { storiesOf } from 'storybook-root';42import
Using AI Code Generation
1import { withPattern } from 'storybook-root'2import { storiesOf } from '@storybook/react'3storiesOf('MyComponent', module)4 .add('default', withPattern('MyComponent', () => <MyComponent />))5 .add('with props', withPattern('MyComponent', () => <MyComponent prop1="foo" prop2="bar" />))6import React from 'react'7import PropTypes from 'prop-types'8const MyComponent = ({ prop1, prop2 }) => (9 <p>prop1: {prop1}</p>10 <p>prop2: {prop2}</p>11MyComponent.propTypes = {12}13export { default } from './MyComponent'14import React from 'react'15import { storiesOf } from '@storybook/react'16import { withPattern } from 'storybook-root'17import MyComponent from './MyComponent'18storiesOf('MyComponent', module)19 .add('default', withPattern('MyComponent', () => <MyComponent />))20 .add('with props', withPattern('MyComponent', () => <MyComponent prop1="foo" prop2="bar" />)))21import React from 'react'22import { shallow } from 'enzyme'23import MyComponent from './MyComponent'24describe('MyComponent', () => {25 it('renders without crashing', () => {26 shallow(<MyComponent />)27 })28 it('renders with props', () => {29 const wrapper = shallow(<MyComponent prop1="foo" prop2="bar" />)30 expect(wrapper.find('p').first().text()).toEqual('prop1: foo')31 expect(wrapper.find('p').last().text()).toEqual('prop2: bar')32 })33})
Using AI Code Generation
1import * as storybookRoot from 'storybook-root';2storybookRoot.pattern('test.js');3import * as storybookRoot from 'storybook-root';4storybookRoot.pattern('test.js', {root: './src'});5import * as storybookRoot from 'storybook-root';6storybookRoot.pattern('test.js', {root: './src', match: 'all'});7import * as storybookRoot from 'storybook-root';8storybookRoot.pattern('test.js', {root: './src', match: 'any'});9import * as storybookRoot from 'storybook-root';10storybookRoot.pattern('test.js', {root: './src', match: 'none'});11import * as storybookRoot from 'storybook-root';12storybookRoot.pattern('test.js', {root: './src', match: 'all', extensions: ['js', 'jsx']});13import * as storybookRoot from 'storybook-root';14storybookRoot.pattern('test.js', {root: './src', match: 'all', extensions: ['js', 'jsx'], ignore: ['node_modules', '.git']});15import * as storybookRoot from 'storybook-root';16storybookRoot.pattern('test.js', {root: './src', match: 'all', extensions: ['js', 'jsx'], ignore: ['node_modules', '.git'], absolute: true});17import * as storybookRoot from 'storybook-root';18storybookRoot.pattern('test.js', {root: './src', match: 'all', extensions: ['js', 'jsx'], ignore: ['node_modules', '.git'], absolute: false});19import * as storybookRoot from 'storybook-root';20storybookRoot.pattern('test.js', {root: './src', match: 'all', extensions: ['js', 'jsx'], ignore: ['node_modules', '.git'], absolute: true, globOptions: {dot: true}});21import * as storybookRoot from 'storybook-root';22storybookRoot.pattern('test.js', {root: './src
Using AI Code Generation
1import React from 'react';2import { storiesOf } from '@storybook/react';3storiesOf('App', module).add('basic', () => <div>App</div>);4import React from 'react';5import ReactDOM from 'react-dom';6import { storiesOf } from '@storybook/react';7storiesOf('App', module).add('basic', () => <div>App</div>);8const { run } = require('storybook-root');9run();10{11 "scripts": {12 },13 "dependencies": {14 },15 "devDependencies": {16 }17}
Using AI Code Generation
1import { pattern } from 'storybook-root';2const pattern = pattern('test');3const pattern = pattern('test', 'test2');4const pattern = pattern('test', 'test2', 'test3');5import { pattern } from 'storybook-root';6const pattern = pattern('test');7const pattern = pattern('test', 'test2');8const pattern = pattern('test', 'test2', 'test3');9import { pattern } from 'storybook-root';10const pattern = pattern('test');11const pattern = pattern('test', 'test2');12const pattern = pattern('test', 'test2', 'test3');13import { pattern } from 'storybook-root';14const pattern = pattern('test');15const pattern = pattern('test', 'test2');16const pattern = pattern('test', 'test2', 'test3');17import { pattern } from 'storybook-root';18const pattern = pattern('test');19const pattern = pattern('test', 'test2');20const pattern = pattern('test', 'test2', 'test3');21import { pattern } from 'storybook-root';22const pattern = pattern('test');23const pattern = pattern('test', 'test2');24const pattern = pattern('test', 'test2', 'test3');25import { pattern } from 'storybook-root';26const pattern = pattern('test');27const pattern = pattern('test', 'test2');28const pattern = pattern('test', 'test2', 'test3');29import { pattern } from 'storybook-root';30const pattern = pattern('test');31const pattern = pattern('test', 'test2');32const pattern = pattern('test', 'test2', 'test3');33import { pattern } from 'storybook-root';34const pattern = pattern('test');35const pattern = pattern('test', 'test2');
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!