tor-browser

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

unicode-index.js (613B)


      1 // SKIP test262 export
      2 // Test does not match the current specification.
      3 
      4 var BUGNUMBER = 1135377;
      5 var summary = "Implement RegExp unicode flag -- Pattern match should start from lead surrogate when lastIndex points corresponding trail surrogate.";
      6 
      7 print(BUGNUMBER + ": " + summary);
      8 
      9 var r = /\uD83D\uDC38/ug;
     10 r.lastIndex = 1;
     11 var str = "\uD83D\uDC38";
     12 var result = r.exec(str);
     13 assertEq(result.length, 1);
     14 assertEq(result[0], "\uD83D\uDC38");
     15 
     16 // This does not match to ES6 spec, but the spec will be changed.
     17 assertEq(result.index, 0);
     18 
     19 if (typeof reportCompare === "function")
     20    reportCompare(true, true);