tor-browser

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

uc-004.js (847B)


      1 /* -*- tab-width: 8; indent-tabs-mode: nil; js-indent-level: 4 -*-
      2 * This Source Code Form is subject to the terms of the Mozilla Public
      3 * License, v. 2.0. If a copy of the MPL was not distributed with this
      4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      5 
      6 var BUGNUMBER = 23612;
      7 
      8 test();
      9 
     10 function test()
     11 {
     12  printStatus ("Unicode Characters 1C-1F with regexps test.");
     13  printBugNumber (BUGNUMBER);
     14   
     15  var ary = ["\u001Cfoo", "\u001Dfoo", "\u001Efoo", "\u001Ffoo"];
     16   
     17  for (var i in ary)
     18  {      
     19    reportCompare (0, ary[Number(i)].search(/^\Sfoo$/),
     20 	   "Unicode characters 1C-1F in regexps, ary[" +
     21 	   i + "] did not match \\S test (it should not.)");
     22    reportCompare (-1, ary[Number(i)].search(/^\sfoo$/),
     23 	   "Unicode characters 1C-1F in regexps, ary[" +
     24 	   i + "] matched \\s test (it should not.)");
     25  }
     26 }