| 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 CharacterClass :: [ [lookahead \notin {^}] ClassRanges ] |
| 7 |
evaluates by evaluating ClassRanges to obtain a CharSet and returning |
| 8 |
that CharSet and the boolean false |
| 9 |
es5id: 15.10.2.13_A1_T16 |
| 10 |
es6id: B.1.4 |
| 11 |
description: > |
| 12 |
Execute /[\d][\12-\14]{1,}[^\d]/.exec("line1\n\n\n\n\nline2") and |
| 13 |
check results |
| 14 |
---*/ |
| 15 |
|
| 16 |
var __executed = /[\d][\12-\14]{1,}[^\d]/.exec("line1\n\n\n\n\nline2"); |
| 17 |
|
| 18 |
var __expected = ["1\n\n\n\n\nl"]; |
| 19 |
__expected.index = 4; |
| 20 |
__expected.input = "line1\n\n\n\n\nline2"; |
| 21 |
|
| 22 |
assert.sameValue(__executed.length, __expected.length, '.length'); |
| 23 |
assert.sameValue(__executed.index, __expected.index, '.index'); |
| 24 |
assert.sameValue(__executed.input, __expected.input, '.input'); |
| 25 |
|
| 26 |
//CHECK#4 |
| 27 |
for(var index=0; index < __expected.length; index++) { |
| 28 |
assert.sameValue(__executed[index], __expected[index], 'index: ' + index); |
| 29 |
} |