tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

S15.10.4.1_A1_T2.js (1134B)


      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_T2
      9 description: >
     10    Pattern is /\t/m and RegExp is new RegExp(pattern,x), where x is
     11    undefined variable
     12 ---*/
     13 
     14 var __pattern = /\t/m;
     15 var __re = new RegExp(__pattern, x);
     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 var x;
     42 
     43 reportCompare(0, 0);