Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/RegExp/S15.10.2.12_A2_T5.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_T5
10 description: >
11 Tested string is
12 "0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ~`!@#$%^&*()-+={[}]|\\:;'<,>./?"
13 + '"'
14 ---*/
15
16 //CHECK#1
17 var non_s = "0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ~`!@#$%^&*()-+={[}]|\\:;'<,>./?" + '"';
18 var regexp_S = /\S/g;
19 var k = 0;
20 while (regexp_S.exec(non_s) !== null) {
21 k++;
22 }
23
24 if (non_s.length !== k) {
25 $ERROR('#1: non-s');
26 }
27
28 //CHECK#2
29 var non_S = '\f\n\r\t\v ';
30 if (/\S/.exec(non_S) !== null) {
31 $ERROR('#2: non-S');
32 }