Debian Codegraph @

js/src/tests/test262/built-ins/RegExp/character-class-escape-non-whitespace-u180e.js

raw
1 // Copyright 2018 Leonardo Balter. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 esid: sec-characterclassescape
6 description: Detect non WhiteSpace using \S+
7 info: |
8 The production CharacterClassEscape :: S evaluates by returning
9 the set of all characters not included in the set returned by
10 CharacterClassEscape :: s
11
12 The Mongolian Vowel Separator (u180e) became a non whitespace character
13 since Unicode 6.3.0
14 features: [u180e]
15 ---*/
16
17 var str = String.fromCharCode(0x180E);
18 assert.sameValue(
19 str.replace(/\S+/g, "test262"),
20 "test262",
21 "Non WhiteSpace character: \\u180E"
22 );
23
24 reportCompare(0, 0);