S15.10.4.1_A1_T5.js (1151B)
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 assert.sameValue( 18 __re.source, 19 __pattern.source, 20 'The value of __re.source is expected to equal the value of __pattern.source' 21 ); 22 23 assert.sameValue( 24 __re.multiline, 25 __pattern.multiline, 26 'The value of __re.multiline is expected to equal the value of __pattern.multiline' 27 ); 28 29 assert.sameValue( 30 __re.global, 31 __pattern.global, 32 'The value of __re.global is expected to equal the value of __pattern.global' 33 ); 34 35 assert.sameValue( 36 __re.ignoreCase, 37 __pattern.ignoreCase, 38 'The value of __re.ignoreCase is expected to equal the value of __pattern.ignoreCase' 39 ); 40 41 reportCompare(0, 0);