1# Copyright 2013 the V8 project authors. All rights reserved. 2# Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions 6# are met: 7# 1. Redistributions of source code must retain the above copyright 8# notice, this list of conditions and the following disclaimer. 9# 2. Redistributions in binary form must reproduce the above copyright 10# notice, this list of conditions and the following disclaimer in the 11# documentation and/or other materials provided with the distribution. 12# 13# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY 14# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 15# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 16# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY 17# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 18# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 19# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 20# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 22# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 24A chunk of our port of PCRE's test suite, adapted to be more applicable to JavaScript. 25 26On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". 27 28 29PASS regex0.exec(input0); is results 30PASS regex0.exec(input1); is results 31PASS regex0.exec(input2); is results 32PASS regex0.exec(input3); is results 33PASS regex1.exec(input0); is results 34PASS regex1.exec(input1); is results 35PASS regex1.exec(input2); is results 36PASS regex1.exec(input3); is results 37PASS regex1.exec(input4); is results 38PASS regex2.exec(input0); is results 39PASS regex3.exec(input0); is results 40PASS regex4.exec(input0); is results 41PASS regex5.exec(input0); is results 42PASS regex6.exec(input0); is results 43PASS regex7.exec(input0); is results 44PASS regex8.exec(input0); is results 45PASS regex9.exec(input0); is results 46PASS regex10.exec(input0); is results 47PASS regex11.exec(input0); is results 48PASS regex12.exec(input0); is results 49PASS regex12.exec(input1); is results 50PASS regex12.exec(input2); is results 51PASS regex12.exec(input3); is results 52PASS regex12.exec(input4); is results 53PASS regex13.exec(input0); is results 54PASS regex13.exec(input1); is results 55PASS regex13.exec(input2); is results 56PASS regex13.exec(input3); is results 57PASS regex13.exec(input4); is results 58PASS regex13.exec(input5); is results 59PASS regex14.exec(input0); is results 60PASS regex14.exec(input1); is results 61PASS regex14.exec(input2); is results 62PASS regex14.exec(input3); is results 63PASS regex14.exec(input4); is results 64PASS regex14.exec(input5); is results 65PASS regex15.exec(input0); is results 66PASS regex15.exec(input1); is results 67PASS regex15.exec(input2); is results 68PASS regex15.exec(input3); is results 69PASS regex15.exec(input4); is results 70PASS regex15.exec(input5); is results 71PASS regex15.exec(input6); is results 72PASS regex15.exec(input7); is results 73PASS regex15.exec(input8); is results 74PASS regex16.exec(input0); is results 75PASS regex16.exec(input1); is results 76PASS regex16.exec(input2); is results 77PASS regex16.exec(input3); is results 78PASS regex16.exec(input4); is results 79PASS regex16.exec(input5); is results 80PASS regex16.exec(input6); is results 81PASS regex16.exec(input7); is results 82PASS regex16.exec(input8); is results 83PASS regex17.exec(input0); is results 84PASS regex21.exec(input0); is results 85PASS regex21.exec(input1); is results 86PASS regex22.exec(input0); is results 87PASS regex22.exec(input1); is results 88PASS regex22.exec(input2); is results 89PASS regex30.exec(input0); is results 90PASS regex31.exec(input0); is results 91PASS regex32.exec(input0); is results 92PASS regex33.exec(input0); is results 93PASS regex34.exec(input0); is results 94PASS regex35.exec(input0); is results 95PASS regex36.exec(input0); is results 96PASS regex37.exec(input0); is results 97PASS regex37.exec(input1); is results 98PASS regex38.exec(input0); is results 99PASS regex38.exec(input1); is results 100PASS regex39.exec(input0); is results 101PASS regex39.exec(input1); is results 102PASS regex40.exec(input0); is results 103PASS regex41.exec(input0); is results 104PASS regex42.exec(input0); is results 105PASS regex43.exec(input0); is results 106PASS regex44.exec(input0); is results 107PASS regex45.exec(input0); is results 108PASS regex47.exec(input0); is results 109PASS regex48.exec(input0); is results 110PASS regex49.exec(input0); is results 111PASS regex49.exec(input1); is results 112PASS regex50.exec(input0); is results 113PASS regex50.exec(input1); is results 114PASS regex51.exec(input0); is results 115PASS regex52.exec(input0); is results 116PASS regex53.exec(input0); is results 117PASS regex53.exec(input1); is results 118PASS regex54.exec(input0); is results 119PASS regex54.exec(input1); is results 120PASS regex54.exec(input2); is results 121PASS regex54.exec(input3); is results 122PASS regex55.exec(input0); is results 123PASS regex55.exec(input1); is results 124PASS regex55.exec(input2); is results 125PASS regex55.exec(input3); is results 126PASS regex56.exec(input0); is results 127PASS regex57.exec(input0); is results 128PASS regex57.exec(input1); is results 129PASS regex57.exec(input2); is results 130PASS regex58.exec(input0); is results 131PASS regex58.exec(input1); is results 132PASS regex58.exec(input2); is results 133PASS regex59.exec(input0); is results 134PASS regex59.exec(input1); is results 135PASS regex60.exec(input0); is results 136PASS regex60.exec(input1); is results 137PASS regex60.exec(input2); is results 138PASS regex61.exec(input0); is results 139PASS regex61.exec(input1); is results 140PASS regex61.exec(input2); is results 141PASS regex62.exec(input0); is results 142PASS regex63.exec(input0); is results 143PASS regex63.exec(input1); is results 144PASS regex63.exec(input2); is results 145PASS regex64.exec(input0); is results 146PASS regex64.exec(input1); is results 147PASS regex64.exec(input2); is results 148PASS regex65.exec(input0); is results 149PASS regex65.exec(input1); is results 150PASS regex66.exec(input0); is results 151PASS regex66.exec(input1); is results 152PASS regex66.exec(input2); is results 153PASS regex67.exec(input0); is results 154PASS regex67.exec(input1); is results 155PASS regex67.exec(input2); is results 156PASS regex68.exec(input0); is results 157PASS regex68.exec(input1); is results 158PASS regex69.exec(input0); is results 159PASS regex69.exec(input1); is results 160PASS regex69.exec(input2); is results 161PASS regex70.exec(input0); is results 162PASS regex70.exec(input1); is results 163PASS regex70.exec(input2); is results 164PASS regex71.exec(input0); is results 165PASS regex71.exec(input1); is results 166PASS regex71.exec(input2); is results 167PASS regex72.exec(input0); is results 168PASS regex72.exec(input1); is results 169PASS regex72.exec(input2); is results 170PASS regex73.exec(input0); is results 171PASS regex73.exec(input1); is results 172PASS regex74.exec(input0); is results 173PASS regex74.exec(input1); is results 174PASS regex74.exec(input2); is results 175PASS regex75.exec(input0); is results 176PASS regex75.exec(input1); is results 177PASS regex75.exec(input2); is results 178PASS regex75.exec(input3); is results 179PASS regex75.exec(input4); is results 180PASS regex76.exec(input0); is results 181PASS regex76.exec(input1); is results 182PASS regex76.exec(input2); is results 183PASS regex77.exec(input0); is results 184PASS regex77.exec(input1); is results 185PASS regex77.exec(input2); is results 186PASS regex77.exec(input3); is results 187PASS regex78.exec(input0); is results 188PASS regex78.exec(input1); is results 189PASS regex78.exec(input2); is results 190PASS regex78.exec(input3); is results 191PASS regex78.exec(input4); is results 192PASS regex78.exec(input5); is results 193PASS regex79.exec(input0); is results 194PASS regex79.exec(input1); is results 195PASS regex79.exec(input2); is results 196PASS regex80.exec(input0); is results 197PASS regex80.exec(input1); is results 198PASS regex80.exec(input2); is results 199PASS regex81.exec(input0); is results 200PASS regex81.exec(input1); is results 201PASS regex81.exec(input2); is results 202PASS regex82.exec(input0); is results 203PASS regex82.exec(input1); is results 204PASS regex82.exec(input2); is results 205PASS regex86.exec(input0); is results 206PASS regex86.exec(input1); is results 207PASS regex86.exec(input2); is results 208PASS regex86.exec(input3); is results 209PASS regex86.exec(input4); is results 210PASS regex87.exec(input0); is results 211PASS regex87.exec(input1); is results 212PASS regex87.exec(input2); is results 213PASS regex87.exec(input3); is results 214PASS regex87.exec(input4); is results 215PASS regex87.exec(input5); is results 216PASS regex88.exec(input0); is results 217PASS regex88.exec(input1); is results 218PASS regex88.exec(input2); is results 219PASS regex88.exec(input3); is results 220PASS regex88.exec(input4); is results 221PASS regex91.exec(input0); is results 222PASS regex91.exec(input1); is results 223PASS regex91.exec(input2); is results 224PASS regex91.exec(input3); is results 225PASS regex91.exec(input4); is results 226PASS regex92.exec(input0); is results 227PASS regex93.exec(input0); is results 228PASS regex94.exec(input0); is results 229PASS regex95.exec(input0); is results 230PASS regex95.exec(input1); is results 231PASS regex96.exec(input0); is results 232PASS regex97.exec(input0); is results 233PASS regex98.exec(input0); is results 234PASS regex99.exec(input0); is results 235PASS regex100.exec(input0); is results 236PASS regex102.exec(input0); is results 237PASS regex103.exec(input0); is results 238PASS regex104.exec(input0); is results 239PASS regex105.exec(input0); is results 240PASS regex105.exec(input1); is results 241PASS regex106.exec(input0); is results 242PASS regex107.exec(input0); is results 243PASS input0.match(regexGlobal0); is results 244PASS input1.match(regexGlobal0); is results 245PASS input0.match(regexGlobal1); is results 246PASS input0.match(regexGlobal2); is results 247PASS input0.match(regexGlobal3); is results 248PASS input0.match(regexGlobal4); is results 249PASS input0.match(regexGlobal5); is results 250PASS input0.match(regexGlobal6); is results 251PASS input0.match(regexGlobal7); is results 252PASS input0.match(regexGlobal8); is results 253PASS input0.match(regexGlobal9); is results 254PASS input0.match(regexGlobal10); is results 255PASS input0.match(regexGlobal11); is results 256PASS input0.match(regexGlobal12); is results 257PASS input0.match(regexGlobal13); is results 258PASS input0.match(regexGlobal14); is results 259PASS input0.match(regexGlobal15); is results 260PASS input0.match(regexGlobal16); is results 261PASS input0.match(regexGlobal17); is results 262PASS input0.match(regexGlobal19); is results 263PASS input0.match(regexGlobal21); is results 264PASS input0.match(regexGlobal24); is results 265PASS input0.match(regexGlobal25); is results 266PASS input0.match(regexGlobal26); is results 267PASS input0.match(regexGlobal27); is results 268PASS input0.match(regexGlobal28); is results 269PASS input1.match(regexGlobal28); is results 270PASS input0.match(regexGlobal29); is results 271PASS input1.match(regexGlobal29); is results 272PASS successfullyParsed is true 273 274TEST COMPLETE 275 276