| 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: | |
| 6 |
If pattern is an object R whose [[Class]] property is "RegExp" and flags is undefined, then let P be |
| 7 |
the pattern used to construct R and let F be the flags used to construct R |
| 8 |
es5id: 15.10.4.1_A1_T5 |
| 9 |
description: > |
| 10 |
Pattern is RegExp("1?","mig") and RegExp is new |
| 11 |
RegExp(pattern,(function(){})()) |
| 12 |
---*/ |
| 13 |
|
| 14 |
var __pattern = RegExp("1?","mig"); |
| 15 |
var __re = new RegExp(__pattern, (function(){})()); |
| 16 |
|
| 17 |
//CHECK#1 |
| 18 |
if (__re.source !== __pattern.source) { |
| 19 |
$ERROR('#1: __pattern = RegExp("1?","mig"); __re = new RegExp(__pattern, (function(){})()); __re.source === __pattern.source. Actual: '+ (__re.source)); |
| 20 |
} |
| 21 |
|
| 22 |
//CHECK#2 |
| 23 |
if (__re.multiline !== __pattern.multiline) { |
| 24 |
$ERROR('#2: __pattern = RegExp("1?","mig"); __re = new RegExp(__pattern, (function(){})()); __re.multiline === __pattern.multiline. Actual: ' + (__re.multiline)); |
| 25 |
} |
| 26 |
|
| 27 |
//CHECK#3 |
| 28 |
if (__re.global !== __pattern.global) { |
| 29 |
$ERROR('#3: __pattern = RegExp("1?","mig"); __re = new RegExp(__pattern, (function(){})()); __re.global === __pattern.global. Actual: ' + (__re.global)); |
| 30 |
} |
| 31 |
|
| 32 |
//CHECK#4 |
| 33 |
if (__re.ignoreCase !== __pattern.ignoreCase) { |
| 34 |
$ERROR('#4: __pattern = RegExp("1?","mig"); __re = new RegExp(__pattern, (function(){})()); __re.ignoreCase === __pattern.ignoreCase. Actual: ' + (__re.ignoreCase)); |
| 35 |
} |