Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/RegExp/S15.10.2.12_A2_T4.js

raw
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: |
6 The production CharacterClassEscape :: S evaluates by returning
7 the set of all characters not included in the set returned by
8 CharacterClassEscape :: s
9 es5id: 15.10.2.12_A2_T4
10 description: RUSSIAN ALPHABET
11 ---*/
12
13 var regexp_S = /\S/;
14
15 //CHECK#0410-042F
16 var result = true;
17 for (var alpha = 0x0410; alpha <= 0x042F; alpha++) {
18 var str = String.fromCharCode(alpha);
19 var arr = regexp_S.exec(str);
20 if ((arr === null) || (arr[0] !== str)) {
21 result = false;
22 }
23 }
24
25 if (result !== true) {
26 $ERROR('#1: RUSSIAN CAPITAL ALPHABET');
27 }
28
29 //CHECK#0430-044F
30 var result = true;
31 for (alpha = 0x0430; alpha <= 0x044F; alpha++) {
32 str = String.fromCharCode(alpha);
33 arr = regexp_S.exec(str);
34 if ((arr === null) || (arr[0] !== str)) {
35 result = false;
36 }
37 }
38
39 if (result !== true) {
40 $ERROR('#2: russian small alphabet');
41 }