Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/RegExp/S15.10.2.12_A1_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 the set of characters
7 containing the characters that are on the right-hand side of the WhiteSpace (7.2) or LineTerminator (7.3) productions
8 es5id: 15.10.2.12_A1_T4
9 description: RUSSIAN ALPHABET
10 ---*/
11
12 var regexp_s = /\s/;
13
14 //CHECK#0410-042F
15 var result = true;
16 for (var alpha = 0x0410; alpha <= 0x042F; alpha++) {
17 if (regexp_s.exec(String.fromCharCode(alpha)) !== null) {
18 result = false;
19 }
20 }
21
22 if (result !== true) {
23 $ERROR('#1: RUSSIAN CAPITAL ALPHABET');
24 }
25
26 //CHECK#0430-044F
27 var result = true;
28 for (alpha = 0x0430; alpha <= 0x044F; alpha++) {
29 if (regexp_s.exec(String.fromCharCode(alpha)) !== null) {
30 result = false;
31 }
32 }
33
34 if (result !== true) {
35 $ERROR('#2: russian small alphabet');
36 }