Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/RegExp/S15.10.2.12_A5_T3.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 :: d evaluates by returning the
7 ten-element set of characters containing the characters 0 through 9
8 inclusive
9 es5id: 15.10.2.12_A5_T3
10 description: RUSSIAN ALPHABET
11 ---*/
12
13 var regexp_d = /\d/;
14
15 //CHECK#0410-042F
16 var result = true;
17 for (var alpha = 0x0410; alpha <= 0x042F; alpha++) {
18 if (regexp_d.exec(String.fromCharCode(alpha)) !== null) {
19 result = false;
20 }
21 }
22
23 if (result !== true) {
24 $ERROR('#1: RUSSIAN CAPITAL ALPHABET');
25 }
26
27 //CHECK#0430-044F
28 var result = true;
29 for (alpha = 0x0430; alpha <= 0x044F; alpha++) {
30 if (regexp_d.exec(String.fromCharCode(alpha)) !== null) {
31 result = false;
32 }
33 }
34
35 if (result !== true) {
36 $ERROR('#2: russian small alphabet');
37 }