Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/RegExp/S15.10.2.10_A5.1_T1.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 CharacterEscape :: IdentityEscapeSequence :: SourceCharacter but not
7 IdentifierPart
8 es5id: 15.10.2.10_A5.1_T1
9 description: "Tested string is \"~`!@#$%^&*()-+={[}]|\\\\:;'<,>./?\" + '\"'"
10 ---*/
11
12 //CHECK#1
13 var non_ident = "~`!@#$%^&*()-+={[}]|\\:;'<,>./?" + '"';
14 for (var k = 0; k < non_ident.length; ++k) {
15 var arr = new RegExp("\\" + non_ident[k], "g").exec(non_ident);
16 assert.notSameValue(arr, null, "No match for character: " + non_ident[k]);
17 assert.sameValue(arr[0], non_ident[k]);
18 }