2011-09-07 08:35:18 +02:00
|
|
|
// Copyright 2009 the Sputnik authors. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
2014-07-22 01:09:02 +02:00
|
|
|
/*---
|
|
|
|
info: >
|
|
|
|
The production CharacterClass :: [ [lookahead \notin {^}] ClassRanges ]
|
|
|
|
evaluates by evaluating ClassRanges to obtain a CharSet and returning
|
|
|
|
that CharSet and the boolean false
|
2014-07-25 00:41:42 +02:00
|
|
|
es5id: 15.10.2.13_A1_T16
|
2015-09-07 18:56:02 +02:00
|
|
|
es6id: B.1.4
|
2014-07-22 01:09:02 +02:00
|
|
|
description: >
|
|
|
|
Execute /[\d][\12-\14]{1,}[^\d]/.exec("line1\n\n\n\n\nline2") and
|
|
|
|
check results
|
|
|
|
---*/
|
2011-09-07 08:35:18 +02:00
|
|
|
|
2015-04-29 17:42:48 +02:00
|
|
|
var __executed = /[\d][\12-\14]{1,}[^\d]/.exec("line1\n\n\n\n\nline2");
|
2011-09-07 08:35:18 +02:00
|
|
|
|
2015-04-29 17:42:48 +02:00
|
|
|
var __expected = ["1\n\n\n\n\nl"];
|
2011-09-07 08:35:18 +02:00
|
|
|
__expected.index = 4;
|
|
|
|
__expected.input = "line1\n\n\n\n\nline2";
|
|
|
|
|
2017-04-24 21:31:48 +02:00
|
|
|
assert.sameValue(__executed.length, __expected.length, '.length');
|
|
|
|
assert.sameValue(__executed.index, __expected.index, '.index');
|
|
|
|
assert.sameValue(__executed.input, __expected.input, '.input');
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
//CHECK#4
|
2017-04-24 21:31:48 +02:00
|
|
|
for(var index=0; index < __expected.length; index++) {
|
|
|
|
assert.sameValue(__executed[index], __expected[index], 'index: ' + index);
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|