S15.10.2.10_A2.1_T2.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_T2 7 description: "ControlLetter :: a - z" 8 ---*/ 9 10 var result = true; 11 for (var alpha = 0x0061; alpha <= 0x007A; 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);