tor-browser

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

S15.10.2.10_A2.1_T1.js (615B)


      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: "CharacterEscape :: c ControlLetter"
      6 es5id: 15.10.2.10_A2.1_T1
      7 description: "ControlLetter :: A - Z"
      8 ---*/
      9 
     10 var result = true;
     11 for (var alpha = 0x0041; alpha <= 0x005A; alpha++) {
     12  var str = String.fromCharCode(alpha % 32);
     13  var arr = (new RegExp("\\c" + String.fromCharCode(alpha))).exec(str);  
     14  if ((arr === null) || (arr[0] !== str)) {
     15    result = false;
     16  }
     17 }
     18 
     19 assert.sameValue(result, true, 'The value of result is expected to be true');
     20 
     21 reportCompare(0, 0);