Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / RegExp / S15.10.2.10_A2.1_T1.js
blob5ccba147194a46876d854780967c55d003214787
1 // Copyright 2009 the Sputnik authors.  All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 info: "CharacterEscape :: c ControlLetter"
6 es5id: 15.10.2.10_A2.1_T1
7 description: "ControlLetter :: A - Z"
8 ---*/
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   }
19 assert.sameValue(result, true, 'The value of result is expected to be true');
21 reportCompare(0, 0);