| 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_T4 |
| 10 |
description: non-d |
| 11 |
---*/ |
| 12 |
|
| 13 |
//CHECK#1 |
| 14 |
var non_d = "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\f\n\r\t\v~`!@#$%^&*()-+={[}]|\\:;'<,>./? " + '"'; |
| 15 |
if (/\d/.exec(non_d) !== null) { |
| 16 |
$ERROR('#1: non-d'); |
| 17 |
} |
| 18 |
|
| 19 |
//CHECK#2 |
| 20 |
var non_D = '0123456789'; |
| 21 |
var regexp_d = /\d/g; |
| 22 |
var k = 0; |
| 23 |
while (regexp_d.exec(non_D) !== null) { |
| 24 |
k++; |
| 25 |
} |
| 26 |
|
| 27 |
if (non_D.length !== k) { |
| 28 |
$ERROR('#2: non-D'); |
| 29 |
} |