| 1 |
// Copyright 2009 the Sputnik authors. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
info: let P be ToString(pattern) and let F be ToString(flags) |
| 6 |
es5id: 15.10.4.1_A8_T2 |
| 7 |
description: Pattern is function(){return "a|b|[]";}() and flags is "ig" |
| 8 |
---*/ |
| 9 |
|
| 10 |
var __re = new RegExp(function(){return "a|b|[]";}(),"ig"); |
| 11 |
|
| 12 |
//CHECK#1 |
| 13 |
if (__re.ignoreCase !== true) { |
| 14 |
$ERROR('#1: __re = new RegExp(function(){return "a|b|[]"; __re.ignoreCase === true. Actual: ' + (__re.ignoreCase)); |
| 15 |
} |
| 16 |
|
| 17 |
//CHECK#2 |
| 18 |
if (__re.multiline !== false) { |
| 19 |
$ERROR('#2: __re = new RegExp(function(){return "a|b|[]"; __re.multiline === false. Actual: ' + (__re.multiline)); |
| 20 |
} |
| 21 |
|
| 22 |
//CHECK#3 |
| 23 |
if (__re.global !== true) { |
| 24 |
$ERROR('#3: __re = new RegExp(function(){return "a|b|[]"; __re.global === true. Actual: ' + (__re.global)); |
| 25 |
} |
| 26 |
|
| 27 |
//CHECK#4 |
| 28 |
if (__re.lastIndex !== 0) { |
| 29 |
$ERROR('#4: __re = new RegExp(function(){return "a|b|[]"; __re.lastIndex === 0. Actual: ' + (__re.lastIndex)); |
| 30 |
} |
| 31 |
|
| 32 |
//CHECK#5 |
| 33 |
if (typeof __re.source === "undefined") { |
| 34 |
$ERROR('#5: __re = new RegExp(function(){return "a|b|[]"; typeof __re.source !== "undefined"'); |
| 35 |
} |