Update tests for CharacterClassEscapes in RegExps (#1611)

This commit is contained in:
Leo Balter 2018-07-09 12:30:33 -04:00 committed by GitHub
parent ac02aa57ff
commit 0fde488bb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
49 changed files with 1680 additions and 4857 deletions

View File

@ -0,0 +1,70 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-CharacterClassEscape
description: >
Compare range for Digit class escape, \\d with flags ug
info: |
This is a generated test, please checkout https://github.com/bocoup/test262-regexp-generator
for any changes.
CharacterClassEscape[U] ::
d
D
s
S
w
W
21.2.2.12 CharacterClassEscape
The production CharacterClassEscape :: d evaluates as follows:
Return the ten-element set of characters containing the characters 0 through 9 inclusive.
The production CharacterClassEscape :: D evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
The production CharacterClassEscape :: s evaluates as follows:
Return the set of characters containing the characters that are on the right-hand side of
the WhiteSpace or LineTerminator productions.
The production CharacterClassEscape :: S evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
The production CharacterClassEscape :: w evaluates as follows:
Return the set of all characters returned by WordCharacters().
The production CharacterClassEscape :: W evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
features: [String.fromCodePoint]
---*/
const chunks = [];
const totalChunks = Math.ceil(0x10ffff / 0x10000);
for (let codePoint = 0; codePoint < 0x10FFFF; codePoint++) {
// split strings to avoid a super long one;
chunks[codePoint % totalChunks] += String.fromCodePoint(codePoint);
}
const re = /\d/ug;
const matchingRange = /[0-9]/ug;
const errors = [];
function matching(str) {
return str.replace(re, '') === str.replace(matchingRange, '');
}
for (const str of chunks) {
if (!matching(str)) {
// Error, let's find out where
for (const char of str) {
if (!matching(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
}
}
};
assert.sameValue(
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
);

View File

@ -0,0 +1,70 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-CharacterClassEscape
description: >
Compare range for Digit class escape, \\d+ with flags ug
info: |
This is a generated test, please checkout https://github.com/bocoup/test262-regexp-generator
for any changes.
CharacterClassEscape[U] ::
d
D
s
S
w
W
21.2.2.12 CharacterClassEscape
The production CharacterClassEscape :: d evaluates as follows:
Return the ten-element set of characters containing the characters 0 through 9 inclusive.
The production CharacterClassEscape :: D evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
The production CharacterClassEscape :: s evaluates as follows:
Return the set of characters containing the characters that are on the right-hand side of
the WhiteSpace or LineTerminator productions.
The production CharacterClassEscape :: S evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
The production CharacterClassEscape :: w evaluates as follows:
Return the set of all characters returned by WordCharacters().
The production CharacterClassEscape :: W evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
features: [String.fromCodePoint]
---*/
const chunks = [];
const totalChunks = Math.ceil(0x10ffff / 0x10000);
for (let codePoint = 0; codePoint < 0x10FFFF; codePoint++) {
// split strings to avoid a super long one;
chunks[codePoint % totalChunks] += String.fromCodePoint(codePoint);
}
const re = /\d+/ug;
const matchingRange = /[0-9]+/ug;
const errors = [];
function matching(str) {
return str.replace(re, '') === str.replace(matchingRange, '');
}
for (const str of chunks) {
if (!matching(str)) {
// Error, let's find out where
for (const char of str) {
if (!matching(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
}
}
};
assert.sameValue(
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
);

View File

@ -0,0 +1,70 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-CharacterClassEscape
description: >
Compare range for Digit class escape, \\d+ with flags g
info: |
This is a generated test, please checkout https://github.com/bocoup/test262-regexp-generator
for any changes.
CharacterClassEscape[U] ::
d
D
s
S
w
W
21.2.2.12 CharacterClassEscape
The production CharacterClassEscape :: d evaluates as follows:
Return the ten-element set of characters containing the characters 0 through 9 inclusive.
The production CharacterClassEscape :: D evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
The production CharacterClassEscape :: s evaluates as follows:
Return the set of characters containing the characters that are on the right-hand side of
the WhiteSpace or LineTerminator productions.
The production CharacterClassEscape :: S evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
The production CharacterClassEscape :: w evaluates as follows:
Return the set of all characters returned by WordCharacters().
The production CharacterClassEscape :: W evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
features: [String.fromCodePoint]
---*/
const chunks = [];
const totalChunks = Math.ceil(0xffff / 0x10000);
for (let codePoint = 0; codePoint < 0xFFFF; codePoint++) {
// split strings to avoid a super long one;
chunks[codePoint % totalChunks] += String.fromCodePoint(codePoint);
}
const re = /\d+/g;
const matchingRange = /[0-9]+/g;
const errors = [];
function matching(str) {
return str.replace(re, '') === str.replace(matchingRange, '');
}
for (const str of chunks) {
if (!matching(str)) {
// Error, let's find out where
for (const char of str) {
if (!matching(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
}
}
};
assert.sameValue(
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
);

View File

@ -0,0 +1,70 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-CharacterClassEscape
description: >
Compare range for Digit class escape, \\d with flags g
info: |
This is a generated test, please checkout https://github.com/bocoup/test262-regexp-generator
for any changes.
CharacterClassEscape[U] ::
d
D
s
S
w
W
21.2.2.12 CharacterClassEscape
The production CharacterClassEscape :: d evaluates as follows:
Return the ten-element set of characters containing the characters 0 through 9 inclusive.
The production CharacterClassEscape :: D evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
The production CharacterClassEscape :: s evaluates as follows:
Return the set of characters containing the characters that are on the right-hand side of
the WhiteSpace or LineTerminator productions.
The production CharacterClassEscape :: S evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
The production CharacterClassEscape :: w evaluates as follows:
Return the set of all characters returned by WordCharacters().
The production CharacterClassEscape :: W evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
features: [String.fromCodePoint]
---*/
const chunks = [];
const totalChunks = Math.ceil(0xffff / 0x10000);
for (let codePoint = 0; codePoint < 0xFFFF; codePoint++) {
// split strings to avoid a super long one;
chunks[codePoint % totalChunks] += String.fromCodePoint(codePoint);
}
const re = /\d/g;
const matchingRange = /[0-9]/g;
const errors = [];
function matching(str) {
return str.replace(re, '') === str.replace(matchingRange, '');
}
for (const str of chunks) {
if (!matching(str)) {
// Error, let's find out where
for (const char of str) {
if (!matching(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
}
}
};
assert.sameValue(
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
);

View File

@ -0,0 +1,70 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-CharacterClassEscape
description: >
Compare range for Non Digit class escape, \\D with flags ug
info: |
This is a generated test, please checkout https://github.com/bocoup/test262-regexp-generator
for any changes.
CharacterClassEscape[U] ::
d
D
s
S
w
W
21.2.2.12 CharacterClassEscape
The production CharacterClassEscape :: d evaluates as follows:
Return the ten-element set of characters containing the characters 0 through 9 inclusive.
The production CharacterClassEscape :: D evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
The production CharacterClassEscape :: s evaluates as follows:
Return the set of characters containing the characters that are on the right-hand side of
the WhiteSpace or LineTerminator productions.
The production CharacterClassEscape :: S evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
The production CharacterClassEscape :: w evaluates as follows:
Return the set of all characters returned by WordCharacters().
The production CharacterClassEscape :: W evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
features: [String.fromCodePoint]
---*/
const chunks = [];
const totalChunks = Math.ceil(0x10ffff / 0x10000);
for (let codePoint = 0; codePoint < 0x10FFFF; codePoint++) {
// split strings to avoid a super long one;
chunks[codePoint % totalChunks] += String.fromCodePoint(codePoint);
}
const re = /\D/ug;
const matchingRange = /[\0-\/:-\u{10FFFF}]/ug;
const errors = [];
function matching(str) {
return str.replace(re, '') === str.replace(matchingRange, '');
}
for (const str of chunks) {
if (!matching(str)) {
// Error, let's find out where
for (const char of str) {
if (!matching(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
}
}
};
assert.sameValue(
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
);

View File

@ -0,0 +1,70 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-CharacterClassEscape
description: >
Compare range for Non Digit class escape, \\D+ with flags ug
info: |
This is a generated test, please checkout https://github.com/bocoup/test262-regexp-generator
for any changes.
CharacterClassEscape[U] ::
d
D
s
S
w
W
21.2.2.12 CharacterClassEscape
The production CharacterClassEscape :: d evaluates as follows:
Return the ten-element set of characters containing the characters 0 through 9 inclusive.
The production CharacterClassEscape :: D evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
The production CharacterClassEscape :: s evaluates as follows:
Return the set of characters containing the characters that are on the right-hand side of
the WhiteSpace or LineTerminator productions.
The production CharacterClassEscape :: S evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
The production CharacterClassEscape :: w evaluates as follows:
Return the set of all characters returned by WordCharacters().
The production CharacterClassEscape :: W evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
features: [String.fromCodePoint]
---*/
const chunks = [];
const totalChunks = Math.ceil(0x10ffff / 0x10000);
for (let codePoint = 0; codePoint < 0x10FFFF; codePoint++) {
// split strings to avoid a super long one;
chunks[codePoint % totalChunks] += String.fromCodePoint(codePoint);
}
const re = /\D+/ug;
const matchingRange = /[\0-\/:-\u{10FFFF}]+/ug;
const errors = [];
function matching(str) {
return str.replace(re, '') === str.replace(matchingRange, '');
}
for (const str of chunks) {
if (!matching(str)) {
// Error, let's find out where
for (const char of str) {
if (!matching(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
}
}
};
assert.sameValue(
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
);

View File

@ -0,0 +1,70 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-CharacterClassEscape
description: >
Compare range for Non Digit class escape, \\D+ with flags g
info: |
This is a generated test, please checkout https://github.com/bocoup/test262-regexp-generator
for any changes.
CharacterClassEscape[U] ::
d
D
s
S
w
W
21.2.2.12 CharacterClassEscape
The production CharacterClassEscape :: d evaluates as follows:
Return the ten-element set of characters containing the characters 0 through 9 inclusive.
The production CharacterClassEscape :: D evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
The production CharacterClassEscape :: s evaluates as follows:
Return the set of characters containing the characters that are on the right-hand side of
the WhiteSpace or LineTerminator productions.
The production CharacterClassEscape :: S evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
The production CharacterClassEscape :: w evaluates as follows:
Return the set of all characters returned by WordCharacters().
The production CharacterClassEscape :: W evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
features: [String.fromCodePoint]
---*/
const chunks = [];
const totalChunks = Math.ceil(0xffff / 0x10000);
for (let codePoint = 0; codePoint < 0xFFFF; codePoint++) {
// split strings to avoid a super long one;
chunks[codePoint % totalChunks] += String.fromCodePoint(codePoint);
}
const re = /\D+/g;
const matchingRange = /[\0-\/:-\uFFFF]+/g;
const errors = [];
function matching(str) {
return str.replace(re, '') === str.replace(matchingRange, '');
}
for (const str of chunks) {
if (!matching(str)) {
// Error, let's find out where
for (const char of str) {
if (!matching(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
}
}
};
assert.sameValue(
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
);

View File

@ -0,0 +1,70 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-CharacterClassEscape
description: >
Compare range for Non Digit class escape, \\D with flags g
info: |
This is a generated test, please checkout https://github.com/bocoup/test262-regexp-generator
for any changes.
CharacterClassEscape[U] ::
d
D
s
S
w
W
21.2.2.12 CharacterClassEscape
The production CharacterClassEscape :: d evaluates as follows:
Return the ten-element set of characters containing the characters 0 through 9 inclusive.
The production CharacterClassEscape :: D evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
The production CharacterClassEscape :: s evaluates as follows:
Return the set of characters containing the characters that are on the right-hand side of
the WhiteSpace or LineTerminator productions.
The production CharacterClassEscape :: S evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
The production CharacterClassEscape :: w evaluates as follows:
Return the set of all characters returned by WordCharacters().
The production CharacterClassEscape :: W evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
features: [String.fromCodePoint]
---*/
const chunks = [];
const totalChunks = Math.ceil(0xffff / 0x10000);
for (let codePoint = 0; codePoint < 0xFFFF; codePoint++) {
// split strings to avoid a super long one;
chunks[codePoint % totalChunks] += String.fromCodePoint(codePoint);
}
const re = /\D/g;
const matchingRange = /[\0-\/:-\uFFFF]/g;
const errors = [];
function matching(str) {
return str.replace(re, '') === str.replace(matchingRange, '');
}
for (const str of chunks) {
if (!matching(str)) {
// Error, let's find out where
for (const char of str) {
if (!matching(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
}
}
};
assert.sameValue(
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
);

View File

@ -0,0 +1,70 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-CharacterClassEscape
description: >
Compare range for Non whitespace class escape, \\S with flags ug
info: |
This is a generated test, please checkout https://github.com/bocoup/test262-regexp-generator
for any changes.
CharacterClassEscape[U] ::
d
D
s
S
w
W
21.2.2.12 CharacterClassEscape
The production CharacterClassEscape :: d evaluates as follows:
Return the ten-element set of characters containing the characters 0 through 9 inclusive.
The production CharacterClassEscape :: D evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
The production CharacterClassEscape :: s evaluates as follows:
Return the set of characters containing the characters that are on the right-hand side of
the WhiteSpace or LineTerminator productions.
The production CharacterClassEscape :: S evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
The production CharacterClassEscape :: w evaluates as follows:
Return the set of all characters returned by WordCharacters().
The production CharacterClassEscape :: W evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
features: [String.fromCodePoint]
---*/
const chunks = [];
const totalChunks = Math.ceil(0x10ffff / 0x10000);
for (let codePoint = 0; codePoint < 0x10FFFF; codePoint++) {
// split strings to avoid a super long one;
chunks[codePoint % totalChunks] += String.fromCodePoint(codePoint);
}
const re = /\S/ug;
const matchingRange = /[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uFEFE\uFF00-\u{10FFFF}]/ug;
const errors = [];
function matching(str) {
return str.replace(re, '') === str.replace(matchingRange, '');
}
for (const str of chunks) {
if (!matching(str)) {
// Error, let's find out where
for (const char of str) {
if (!matching(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
}
}
};
assert.sameValue(
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
);

View File

@ -0,0 +1,70 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-CharacterClassEscape
description: >
Compare range for Non whitespace class escape, \\S+ with flags ug
info: |
This is a generated test, please checkout https://github.com/bocoup/test262-regexp-generator
for any changes.
CharacterClassEscape[U] ::
d
D
s
S
w
W
21.2.2.12 CharacterClassEscape
The production CharacterClassEscape :: d evaluates as follows:
Return the ten-element set of characters containing the characters 0 through 9 inclusive.
The production CharacterClassEscape :: D evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
The production CharacterClassEscape :: s evaluates as follows:
Return the set of characters containing the characters that are on the right-hand side of
the WhiteSpace or LineTerminator productions.
The production CharacterClassEscape :: S evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
The production CharacterClassEscape :: w evaluates as follows:
Return the set of all characters returned by WordCharacters().
The production CharacterClassEscape :: W evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
features: [String.fromCodePoint]
---*/
const chunks = [];
const totalChunks = Math.ceil(0x10ffff / 0x10000);
for (let codePoint = 0; codePoint < 0x10FFFF; codePoint++) {
// split strings to avoid a super long one;
chunks[codePoint % totalChunks] += String.fromCodePoint(codePoint);
}
const re = /\S+/ug;
const matchingRange = /[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uFEFE\uFF00-\u{10FFFF}]+/ug;
const errors = [];
function matching(str) {
return str.replace(re, '') === str.replace(matchingRange, '');
}
for (const str of chunks) {
if (!matching(str)) {
// Error, let's find out where
for (const char of str) {
if (!matching(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
}
}
};
assert.sameValue(
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
);

View File

@ -0,0 +1,70 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-CharacterClassEscape
description: >
Compare range for Non whitespace class escape, \\S+ with flags g
info: |
This is a generated test, please checkout https://github.com/bocoup/test262-regexp-generator
for any changes.
CharacterClassEscape[U] ::
d
D
s
S
w
W
21.2.2.12 CharacterClassEscape
The production CharacterClassEscape :: d evaluates as follows:
Return the ten-element set of characters containing the characters 0 through 9 inclusive.
The production CharacterClassEscape :: D evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
The production CharacterClassEscape :: s evaluates as follows:
Return the set of characters containing the characters that are on the right-hand side of
the WhiteSpace or LineTerminator productions.
The production CharacterClassEscape :: S evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
The production CharacterClassEscape :: w evaluates as follows:
Return the set of all characters returned by WordCharacters().
The production CharacterClassEscape :: W evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
features: [String.fromCodePoint]
---*/
const chunks = [];
const totalChunks = Math.ceil(0xffff / 0x10000);
for (let codePoint = 0; codePoint < 0xFFFF; codePoint++) {
// split strings to avoid a super long one;
chunks[codePoint % totalChunks] += String.fromCodePoint(codePoint);
}
const re = /\S+/g;
const matchingRange = /[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uFEFE\uFF00-\uFFFF]+/g;
const errors = [];
function matching(str) {
return str.replace(re, '') === str.replace(matchingRange, '');
}
for (const str of chunks) {
if (!matching(str)) {
// Error, let's find out where
for (const char of str) {
if (!matching(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
}
}
};
assert.sameValue(
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
);

View File

@ -0,0 +1,70 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-CharacterClassEscape
description: >
Compare range for Non whitespace class escape, \\S with flags g
info: |
This is a generated test, please checkout https://github.com/bocoup/test262-regexp-generator
for any changes.
CharacterClassEscape[U] ::
d
D
s
S
w
W
21.2.2.12 CharacterClassEscape
The production CharacterClassEscape :: d evaluates as follows:
Return the ten-element set of characters containing the characters 0 through 9 inclusive.
The production CharacterClassEscape :: D evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
The production CharacterClassEscape :: s evaluates as follows:
Return the set of characters containing the characters that are on the right-hand side of
the WhiteSpace or LineTerminator productions.
The production CharacterClassEscape :: S evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
The production CharacterClassEscape :: w evaluates as follows:
Return the set of all characters returned by WordCharacters().
The production CharacterClassEscape :: W evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
features: [String.fromCodePoint]
---*/
const chunks = [];
const totalChunks = Math.ceil(0xffff / 0x10000);
for (let codePoint = 0; codePoint < 0xFFFF; codePoint++) {
// split strings to avoid a super long one;
chunks[codePoint % totalChunks] += String.fromCodePoint(codePoint);
}
const re = /\S/g;
const matchingRange = /[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uFEFE\uFF00-\uFFFF]/g;
const errors = [];
function matching(str) {
return str.replace(re, '') === str.replace(matchingRange, '');
}
for (const str of chunks) {
if (!matching(str)) {
// Error, let's find out where
for (const char of str) {
if (!matching(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
}
}
};
assert.sameValue(
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
);

View File

@ -0,0 +1,70 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-CharacterClassEscape
description: >
Compare range for Non Word class escape, \\W with flags ug
info: |
This is a generated test, please checkout https://github.com/bocoup/test262-regexp-generator
for any changes.
CharacterClassEscape[U] ::
d
D
s
S
w
W
21.2.2.12 CharacterClassEscape
The production CharacterClassEscape :: d evaluates as follows:
Return the ten-element set of characters containing the characters 0 through 9 inclusive.
The production CharacterClassEscape :: D evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
The production CharacterClassEscape :: s evaluates as follows:
Return the set of characters containing the characters that are on the right-hand side of
the WhiteSpace or LineTerminator productions.
The production CharacterClassEscape :: S evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
The production CharacterClassEscape :: w evaluates as follows:
Return the set of all characters returned by WordCharacters().
The production CharacterClassEscape :: W evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
features: [String.fromCodePoint]
---*/
const chunks = [];
const totalChunks = Math.ceil(0x10ffff / 0x10000);
for (let codePoint = 0; codePoint < 0x10FFFF; codePoint++) {
// split strings to avoid a super long one;
chunks[codePoint % totalChunks] += String.fromCodePoint(codePoint);
}
const re = /\W/ug;
const matchingRange = /[\0-\/:-@\[-\^`\{-\u{10FFFF}]/ug;
const errors = [];
function matching(str) {
return str.replace(re, '') === str.replace(matchingRange, '');
}
for (const str of chunks) {
if (!matching(str)) {
// Error, let's find out where
for (const char of str) {
if (!matching(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
}
}
};
assert.sameValue(
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
);

View File

@ -0,0 +1,70 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-CharacterClassEscape
description: >
Compare range for Non Word class escape, \\W+ with flags ug
info: |
This is a generated test, please checkout https://github.com/bocoup/test262-regexp-generator
for any changes.
CharacterClassEscape[U] ::
d
D
s
S
w
W
21.2.2.12 CharacterClassEscape
The production CharacterClassEscape :: d evaluates as follows:
Return the ten-element set of characters containing the characters 0 through 9 inclusive.
The production CharacterClassEscape :: D evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
The production CharacterClassEscape :: s evaluates as follows:
Return the set of characters containing the characters that are on the right-hand side of
the WhiteSpace or LineTerminator productions.
The production CharacterClassEscape :: S evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
The production CharacterClassEscape :: w evaluates as follows:
Return the set of all characters returned by WordCharacters().
The production CharacterClassEscape :: W evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
features: [String.fromCodePoint]
---*/
const chunks = [];
const totalChunks = Math.ceil(0x10ffff / 0x10000);
for (let codePoint = 0; codePoint < 0x10FFFF; codePoint++) {
// split strings to avoid a super long one;
chunks[codePoint % totalChunks] += String.fromCodePoint(codePoint);
}
const re = /\W+/ug;
const matchingRange = /[\0-\/:-@\[-\^`\{-\u{10FFFF}]+/ug;
const errors = [];
function matching(str) {
return str.replace(re, '') === str.replace(matchingRange, '');
}
for (const str of chunks) {
if (!matching(str)) {
// Error, let's find out where
for (const char of str) {
if (!matching(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
}
}
};
assert.sameValue(
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
);

View File

@ -0,0 +1,70 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-CharacterClassEscape
description: >
Compare range for Non Word class escape, \\W+ with flags g
info: |
This is a generated test, please checkout https://github.com/bocoup/test262-regexp-generator
for any changes.
CharacterClassEscape[U] ::
d
D
s
S
w
W
21.2.2.12 CharacterClassEscape
The production CharacterClassEscape :: d evaluates as follows:
Return the ten-element set of characters containing the characters 0 through 9 inclusive.
The production CharacterClassEscape :: D evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
The production CharacterClassEscape :: s evaluates as follows:
Return the set of characters containing the characters that are on the right-hand side of
the WhiteSpace or LineTerminator productions.
The production CharacterClassEscape :: S evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
The production CharacterClassEscape :: w evaluates as follows:
Return the set of all characters returned by WordCharacters().
The production CharacterClassEscape :: W evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
features: [String.fromCodePoint]
---*/
const chunks = [];
const totalChunks = Math.ceil(0xffff / 0x10000);
for (let codePoint = 0; codePoint < 0xFFFF; codePoint++) {
// split strings to avoid a super long one;
chunks[codePoint % totalChunks] += String.fromCodePoint(codePoint);
}
const re = /\W+/g;
const matchingRange = /[\0-\/:-@\[-\^`\{-\uFFFF]+/g;
const errors = [];
function matching(str) {
return str.replace(re, '') === str.replace(matchingRange, '');
}
for (const str of chunks) {
if (!matching(str)) {
// Error, let's find out where
for (const char of str) {
if (!matching(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
}
}
};
assert.sameValue(
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
);

View File

@ -0,0 +1,70 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-CharacterClassEscape
description: >
Compare range for Non Word class escape, \\W with flags g
info: |
This is a generated test, please checkout https://github.com/bocoup/test262-regexp-generator
for any changes.
CharacterClassEscape[U] ::
d
D
s
S
w
W
21.2.2.12 CharacterClassEscape
The production CharacterClassEscape :: d evaluates as follows:
Return the ten-element set of characters containing the characters 0 through 9 inclusive.
The production CharacterClassEscape :: D evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
The production CharacterClassEscape :: s evaluates as follows:
Return the set of characters containing the characters that are on the right-hand side of
the WhiteSpace or LineTerminator productions.
The production CharacterClassEscape :: S evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
The production CharacterClassEscape :: w evaluates as follows:
Return the set of all characters returned by WordCharacters().
The production CharacterClassEscape :: W evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
features: [String.fromCodePoint]
---*/
const chunks = [];
const totalChunks = Math.ceil(0xffff / 0x10000);
for (let codePoint = 0; codePoint < 0xFFFF; codePoint++) {
// split strings to avoid a super long one;
chunks[codePoint % totalChunks] += String.fromCodePoint(codePoint);
}
const re = /\W/g;
const matchingRange = /[\0-\/:-@\[-\^`\{-\uFFFF]/g;
const errors = [];
function matching(str) {
return str.replace(re, '') === str.replace(matchingRange, '');
}
for (const str of chunks) {
if (!matching(str)) {
// Error, let's find out where
for (const char of str) {
if (!matching(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
}
}
};
assert.sameValue(
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
);

View File

@ -0,0 +1,70 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-CharacterClassEscape
description: >
Compare range for Whitespace class escape, \\s with flags ug
info: |
This is a generated test, please checkout https://github.com/bocoup/test262-regexp-generator
for any changes.
CharacterClassEscape[U] ::
d
D
s
S
w
W
21.2.2.12 CharacterClassEscape
The production CharacterClassEscape :: d evaluates as follows:
Return the ten-element set of characters containing the characters 0 through 9 inclusive.
The production CharacterClassEscape :: D evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
The production CharacterClassEscape :: s evaluates as follows:
Return the set of characters containing the characters that are on the right-hand side of
the WhiteSpace or LineTerminator productions.
The production CharacterClassEscape :: S evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
The production CharacterClassEscape :: w evaluates as follows:
Return the set of all characters returned by WordCharacters().
The production CharacterClassEscape :: W evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
features: [String.fromCodePoint]
---*/
const chunks = [];
const totalChunks = Math.ceil(0x10ffff / 0x10000);
for (let codePoint = 0; codePoint < 0x10FFFF; codePoint++) {
// split strings to avoid a super long one;
chunks[codePoint % totalChunks] += String.fromCodePoint(codePoint);
}
const re = /\s/ug;
const matchingRange = /[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]/ug;
const errors = [];
function matching(str) {
return str.replace(re, '') === str.replace(matchingRange, '');
}
for (const str of chunks) {
if (!matching(str)) {
// Error, let's find out where
for (const char of str) {
if (!matching(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
}
}
};
assert.sameValue(
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
);

View File

@ -0,0 +1,70 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-CharacterClassEscape
description: >
Compare range for Whitespace class escape, \\s+ with flags ug
info: |
This is a generated test, please checkout https://github.com/bocoup/test262-regexp-generator
for any changes.
CharacterClassEscape[U] ::
d
D
s
S
w
W
21.2.2.12 CharacterClassEscape
The production CharacterClassEscape :: d evaluates as follows:
Return the ten-element set of characters containing the characters 0 through 9 inclusive.
The production CharacterClassEscape :: D evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
The production CharacterClassEscape :: s evaluates as follows:
Return the set of characters containing the characters that are on the right-hand side of
the WhiteSpace or LineTerminator productions.
The production CharacterClassEscape :: S evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
The production CharacterClassEscape :: w evaluates as follows:
Return the set of all characters returned by WordCharacters().
The production CharacterClassEscape :: W evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
features: [String.fromCodePoint]
---*/
const chunks = [];
const totalChunks = Math.ceil(0x10ffff / 0x10000);
for (let codePoint = 0; codePoint < 0x10FFFF; codePoint++) {
// split strings to avoid a super long one;
chunks[codePoint % totalChunks] += String.fromCodePoint(codePoint);
}
const re = /\s+/ug;
const matchingRange = /[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]+/ug;
const errors = [];
function matching(str) {
return str.replace(re, '') === str.replace(matchingRange, '');
}
for (const str of chunks) {
if (!matching(str)) {
// Error, let's find out where
for (const char of str) {
if (!matching(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
}
}
};
assert.sameValue(
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
);

View File

@ -0,0 +1,70 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-CharacterClassEscape
description: >
Compare range for Whitespace class escape, \\s+ with flags g
info: |
This is a generated test, please checkout https://github.com/bocoup/test262-regexp-generator
for any changes.
CharacterClassEscape[U] ::
d
D
s
S
w
W
21.2.2.12 CharacterClassEscape
The production CharacterClassEscape :: d evaluates as follows:
Return the ten-element set of characters containing the characters 0 through 9 inclusive.
The production CharacterClassEscape :: D evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
The production CharacterClassEscape :: s evaluates as follows:
Return the set of characters containing the characters that are on the right-hand side of
the WhiteSpace or LineTerminator productions.
The production CharacterClassEscape :: S evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
The production CharacterClassEscape :: w evaluates as follows:
Return the set of all characters returned by WordCharacters().
The production CharacterClassEscape :: W evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
features: [String.fromCodePoint]
---*/
const chunks = [];
const totalChunks = Math.ceil(0xffff / 0x10000);
for (let codePoint = 0; codePoint < 0xFFFF; codePoint++) {
// split strings to avoid a super long one;
chunks[codePoint % totalChunks] += String.fromCodePoint(codePoint);
}
const re = /\s+/g;
const matchingRange = /[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]+/g;
const errors = [];
function matching(str) {
return str.replace(re, '') === str.replace(matchingRange, '');
}
for (const str of chunks) {
if (!matching(str)) {
// Error, let's find out where
for (const char of str) {
if (!matching(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
}
}
};
assert.sameValue(
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
);

View File

@ -0,0 +1,70 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-CharacterClassEscape
description: >
Compare range for Whitespace class escape, \\s with flags g
info: |
This is a generated test, please checkout https://github.com/bocoup/test262-regexp-generator
for any changes.
CharacterClassEscape[U] ::
d
D
s
S
w
W
21.2.2.12 CharacterClassEscape
The production CharacterClassEscape :: d evaluates as follows:
Return the ten-element set of characters containing the characters 0 through 9 inclusive.
The production CharacterClassEscape :: D evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
The production CharacterClassEscape :: s evaluates as follows:
Return the set of characters containing the characters that are on the right-hand side of
the WhiteSpace or LineTerminator productions.
The production CharacterClassEscape :: S evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
The production CharacterClassEscape :: w evaluates as follows:
Return the set of all characters returned by WordCharacters().
The production CharacterClassEscape :: W evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
features: [String.fromCodePoint]
---*/
const chunks = [];
const totalChunks = Math.ceil(0xffff / 0x10000);
for (let codePoint = 0; codePoint < 0xFFFF; codePoint++) {
// split strings to avoid a super long one;
chunks[codePoint % totalChunks] += String.fromCodePoint(codePoint);
}
const re = /\s/g;
const matchingRange = /[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]/g;
const errors = [];
function matching(str) {
return str.replace(re, '') === str.replace(matchingRange, '');
}
for (const str of chunks) {
if (!matching(str)) {
// Error, let's find out where
for (const char of str) {
if (!matching(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
}
}
};
assert.sameValue(
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
);

View File

@ -0,0 +1,70 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-CharacterClassEscape
description: >
Compare range for Word class escape, \\w with flags ug
info: |
This is a generated test, please checkout https://github.com/bocoup/test262-regexp-generator
for any changes.
CharacterClassEscape[U] ::
d
D
s
S
w
W
21.2.2.12 CharacterClassEscape
The production CharacterClassEscape :: d evaluates as follows:
Return the ten-element set of characters containing the characters 0 through 9 inclusive.
The production CharacterClassEscape :: D evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
The production CharacterClassEscape :: s evaluates as follows:
Return the set of characters containing the characters that are on the right-hand side of
the WhiteSpace or LineTerminator productions.
The production CharacterClassEscape :: S evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
The production CharacterClassEscape :: w evaluates as follows:
Return the set of all characters returned by WordCharacters().
The production CharacterClassEscape :: W evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
features: [String.fromCodePoint]
---*/
const chunks = [];
const totalChunks = Math.ceil(0x10ffff / 0x10000);
for (let codePoint = 0; codePoint < 0x10FFFF; codePoint++) {
// split strings to avoid a super long one;
chunks[codePoint % totalChunks] += String.fromCodePoint(codePoint);
}
const re = /\w/ug;
const matchingRange = /[0-9A-Z_a-z]/ug;
const errors = [];
function matching(str) {
return str.replace(re, '') === str.replace(matchingRange, '');
}
for (const str of chunks) {
if (!matching(str)) {
// Error, let's find out where
for (const char of str) {
if (!matching(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
}
}
};
assert.sameValue(
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
);

View File

@ -0,0 +1,70 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-CharacterClassEscape
description: >
Compare range for Word class escape, \\w+ with flags ug
info: |
This is a generated test, please checkout https://github.com/bocoup/test262-regexp-generator
for any changes.
CharacterClassEscape[U] ::
d
D
s
S
w
W
21.2.2.12 CharacterClassEscape
The production CharacterClassEscape :: d evaluates as follows:
Return the ten-element set of characters containing the characters 0 through 9 inclusive.
The production CharacterClassEscape :: D evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
The production CharacterClassEscape :: s evaluates as follows:
Return the set of characters containing the characters that are on the right-hand side of
the WhiteSpace or LineTerminator productions.
The production CharacterClassEscape :: S evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
The production CharacterClassEscape :: w evaluates as follows:
Return the set of all characters returned by WordCharacters().
The production CharacterClassEscape :: W evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
features: [String.fromCodePoint]
---*/
const chunks = [];
const totalChunks = Math.ceil(0x10ffff / 0x10000);
for (let codePoint = 0; codePoint < 0x10FFFF; codePoint++) {
// split strings to avoid a super long one;
chunks[codePoint % totalChunks] += String.fromCodePoint(codePoint);
}
const re = /\w+/ug;
const matchingRange = /[0-9A-Z_a-z]+/ug;
const errors = [];
function matching(str) {
return str.replace(re, '') === str.replace(matchingRange, '');
}
for (const str of chunks) {
if (!matching(str)) {
// Error, let's find out where
for (const char of str) {
if (!matching(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
}
}
};
assert.sameValue(
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
);

View File

@ -0,0 +1,70 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-CharacterClassEscape
description: >
Compare range for Word class escape, \\w+ with flags g
info: |
This is a generated test, please checkout https://github.com/bocoup/test262-regexp-generator
for any changes.
CharacterClassEscape[U] ::
d
D
s
S
w
W
21.2.2.12 CharacterClassEscape
The production CharacterClassEscape :: d evaluates as follows:
Return the ten-element set of characters containing the characters 0 through 9 inclusive.
The production CharacterClassEscape :: D evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
The production CharacterClassEscape :: s evaluates as follows:
Return the set of characters containing the characters that are on the right-hand side of
the WhiteSpace or LineTerminator productions.
The production CharacterClassEscape :: S evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
The production CharacterClassEscape :: w evaluates as follows:
Return the set of all characters returned by WordCharacters().
The production CharacterClassEscape :: W evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
features: [String.fromCodePoint]
---*/
const chunks = [];
const totalChunks = Math.ceil(0xffff / 0x10000);
for (let codePoint = 0; codePoint < 0xFFFF; codePoint++) {
// split strings to avoid a super long one;
chunks[codePoint % totalChunks] += String.fromCodePoint(codePoint);
}
const re = /\w+/g;
const matchingRange = /[0-9A-Z_a-z]+/g;
const errors = [];
function matching(str) {
return str.replace(re, '') === str.replace(matchingRange, '');
}
for (const str of chunks) {
if (!matching(str)) {
// Error, let's find out where
for (const char of str) {
if (!matching(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
}
}
};
assert.sameValue(
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
);

View File

@ -0,0 +1,70 @@
// Copyright (C) 2018 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: prod-CharacterClassEscape
description: >
Compare range for Word class escape, \\w with flags g
info: |
This is a generated test, please checkout https://github.com/bocoup/test262-regexp-generator
for any changes.
CharacterClassEscape[U] ::
d
D
s
S
w
W
21.2.2.12 CharacterClassEscape
The production CharacterClassEscape :: d evaluates as follows:
Return the ten-element set of characters containing the characters 0 through 9 inclusive.
The production CharacterClassEscape :: D evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: d.
The production CharacterClassEscape :: s evaluates as follows:
Return the set of characters containing the characters that are on the right-hand side of
the WhiteSpace or LineTerminator productions.
The production CharacterClassEscape :: S evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: s.
The production CharacterClassEscape :: w evaluates as follows:
Return the set of all characters returned by WordCharacters().
The production CharacterClassEscape :: W evaluates as follows:
Return the set of all characters not included in the set returned by CharacterClassEscape :: w.
features: [String.fromCodePoint]
---*/
const chunks = [];
const totalChunks = Math.ceil(0xffff / 0x10000);
for (let codePoint = 0; codePoint < 0xFFFF; codePoint++) {
// split strings to avoid a super long one;
chunks[codePoint % totalChunks] += String.fromCodePoint(codePoint);
}
const re = /\w/g;
const matchingRange = /[0-9A-Z_a-z]/g;
const errors = [];
function matching(str) {
return str.replace(re, '') === str.replace(matchingRange, '');
}
for (const str of chunks) {
if (!matching(str)) {
// Error, let's find out where
for (const char of str) {
if (!matching(char)) {
errors.push('0x' + char.codePointAt(0).toString(16));
}
}
}
};
assert.sameValue(
errors.length,
0,
'Expected matching code points, but received: ' + errors.join(',')
);

File diff suppressed because one or more lines are too long

View File

@ -1,34 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: |
The production CharacterClassEscape :: s evaluates by returning the set of characters
containing the characters that are on the right-hand side of the WhiteSpace (7.2) or LineTerminator (7.3) productions
es5id: 15.10.2.12_A1_T2
description: LineTerminator
---*/
//CHECK#1
var arr = /\s/.exec("\u000A");
if ((arr === null) || (arr[0] !== "\u000A")) {
$ERROR('#1: var arr = /\\s/.exec("\\u000A"); arr[0] === "\\u000A". Actual. ' + (arr && arr[0]));
}
//CHECK#2
var arr = /\s/.exec("\u000D");
if ((arr === null) || (arr[0] !== "\u000D")) {
$ERROR('#2: var arr = /\\s/.exec("\\u000D"); arr[0] === "\\u000D". Actual. ' + (arr && arr[0]));
}
//CHECK#3
var arr = /\s/.exec("\u2028");
if ((arr === null) || (arr[0] !== "\u2028")) {
$ERROR('#3: var arr = /\\s/.exec("\\u2028"); arr[0] === "\\u2028". Actual. ' + (arr && arr[0]));
}
//CHECK#4
var arr = /\s/.exec("\u2029");
if ((arr === null) || (arr[0] !== "\u2029")) {
$ERROR('#4: var arr = /\\s/.exec("\\u2029"); arr[0] === "\\u2029". Actual. ' + (arr && arr[0]));
}

View File

@ -1,36 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: |
The production CharacterClassEscape :: s evaluates by returning the set of characters
containing the characters that are on the right-hand side of the WhiteSpace (7.2) or LineTerminator (7.3) productions
es5id: 15.10.2.12_A1_T3
description: ENGLISH ALPHABET
---*/
var regexp_s = /\s/;
//CHECK#0041-005A
var result = true;
for (var alpha = 0x0041; alpha <= 0x005A; alpha++) {
if (regexp_s.exec(String.fromCharCode(alpha)) !== null) {
result = false;
}
}
if (result !== true) {
$ERROR('#1: ENGLISH CAPITAL ALPHABET');
}
//CHECK#0061-007A
var result = true;
for (alpha = 0x0061; alpha <= 0x007A; alpha++) {
if (regexp_s.exec(String.fromCharCode(alpha)) !== null) {
result = false;
}
}
if (result !== true) {
$ERROR('#2: english small alphabet');
}

View File

@ -1,36 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: |
The production CharacterClassEscape :: s evaluates by returning the set of characters
containing the characters that are on the right-hand side of the WhiteSpace (7.2) or LineTerminator (7.3) productions
es5id: 15.10.2.12_A1_T4
description: RUSSIAN ALPHABET
---*/
var regexp_s = /\s/;
//CHECK#0410-042F
var result = true;
for (var alpha = 0x0410; alpha <= 0x042F; alpha++) {
if (regexp_s.exec(String.fromCharCode(alpha)) !== null) {
result = false;
}
}
if (result !== true) {
$ERROR('#1: RUSSIAN CAPITAL ALPHABET');
}
//CHECK#0430-044F
var result = true;
for (alpha = 0x0430; alpha <= 0x044F; alpha++) {
if (regexp_s.exec(String.fromCharCode(alpha)) !== null) {
result = false;
}
}
if (result !== true) {
$ERROR('#2: russian small alphabet');
}

View File

@ -1,31 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: |
The production CharacterClassEscape :: s evaluates by returning the set of characters
containing the characters that are on the right-hand side of the WhiteSpace (7.2) or LineTerminator (7.3) productions
es5id: 15.10.2.12_A1_T5
description: >
Tested string is
"0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ~`!@#$%^&*()-+={[}]|\\:;'<,>./?"
+ '"'
---*/
//CHECK#1
var non_s = "0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ~`!@#$%^&*()-+={[}]|\\:;'<,>./?" + '"';
if (/\s/.exec(non_s) !== null) {
$ERROR('#1: non-s');
}
//CHECK#2
var non_S = '\f\n\r\t\v ';
var regexp_s = /\s/g;
var k = 0;
while (regexp_s.exec(non_S) !== null) {
k++;
}
if (non_S.length !== k) {
$ERROR('#2: non-S');
}

View File

@ -1,35 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: |
The production CharacterClassEscape :: S evaluates by returning
the set of all characters not included in the set returned by
CharacterClassEscape :: s
es5id: 15.10.2.12_A2_T2
description: LineTerminator
---*/
//CHECK#1
var arr = /\S/.exec("\u000A");
if (arr !== null) {
$ERROR('#1: var arr = /\\S/.exec("\\u000A"); arr[0] === "\\u000A". Actual. ' + (arr && arr[0]));
}
//CHECK#2
var arr = /\S/.exec("\u000D");
if (arr !== null) {
$ERROR('#2: var arr = /\\S/.exec("\\u000D"); arr[0] === "\\u000D". Actual. ' + (arr && arr[0]));
}
//CHECK#3
var arr = /\S/.exec("\u2028");
if (arr !== null) {
$ERROR('#3: var arr = /\\S/.exec("\\u2028"); arr[0] === "\\u2028". Actual. ' + (arr && arr[0]));
}
//CHECK#4
var arr = /\S/.exec("\u2029");
if (arr !== null) {
$ERROR('#4: var arr = /\\S/.exec("\\u2029"); arr[0] === "\\u2029". Actual. ' + (arr && arr[0]));
}

View File

@ -1,41 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: |
The production CharacterClassEscape :: S evaluates by returning
the set of all characters not included in the set returned by
CharacterClassEscape :: s
es5id: 15.10.2.12_A2_T3
description: ENGLISH ALPHABET
---*/
var regexp_S = /\S/;
//CHECK#0041-005A
var result = true;
for (var alpha = 0x0041; alpha <= 0x005A; alpha++) {
var str = String.fromCharCode(alpha);
var arr = regexp_S.exec(str);
if ((arr === null) || (arr[0] !== str)) {
result = false;
}
}
if (result !== true) {
$ERROR('#1: ENGLISH CAPITAL ALPHABET');
}
//CHECK#0061-007A
var result = true;
for (alpha = 0x0061; alpha <= 0x007A; alpha++) {
str = String.fromCharCode(alpha);
arr = regexp_S.exec(str);
if ((arr === null) || (arr[0] !== str)) {
result = false;
}
}
if (result !== true) {
$ERROR('#2: english small alphabet');
}

View File

@ -1,41 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: |
The production CharacterClassEscape :: S evaluates by returning
the set of all characters not included in the set returned by
CharacterClassEscape :: s
es5id: 15.10.2.12_A2_T4
description: RUSSIAN ALPHABET
---*/
var regexp_S = /\S/;
//CHECK#0410-042F
var result = true;
for (var alpha = 0x0410; alpha <= 0x042F; alpha++) {
var str = String.fromCharCode(alpha);
var arr = regexp_S.exec(str);
if ((arr === null) || (arr[0] !== str)) {
result = false;
}
}
if (result !== true) {
$ERROR('#1: RUSSIAN CAPITAL ALPHABET');
}
//CHECK#0430-044F
var result = true;
for (alpha = 0x0430; alpha <= 0x044F; alpha++) {
str = String.fromCharCode(alpha);
arr = regexp_S.exec(str);
if ((arr === null) || (arr[0] !== str)) {
result = false;
}
}
if (result !== true) {
$ERROR('#2: russian small alphabet');
}

View File

@ -1,32 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: |
The production CharacterClassEscape :: S evaluates by returning
the set of all characters not included in the set returned by
CharacterClassEscape :: s
es5id: 15.10.2.12_A2_T5
description: >
Tested string is
"0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ~`!@#$%^&*()-+={[}]|\\:;'<,>./?"
+ '"'
---*/
//CHECK#1
var non_s = "0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ~`!@#$%^&*()-+={[}]|\\:;'<,>./?" + '"';
var regexp_S = /\S/g;
var k = 0;
while (regexp_S.exec(non_s) !== null) {
k++;
}
if (non_s.length !== k) {
$ERROR('#1: non-s');
}
//CHECK#2
var non_S = '\f\n\r\t\v ';
if (/\S/.exec(non_S) !== null) {
$ERROR('#2: non-S');
}

File diff suppressed because it is too large Load Diff

View File

@ -1,26 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: |
The production CharacterClassEscape :: w evaluates by returning the set of characters containing the sixty-three characters:
a - z, A - Z, 0 - 9, _
es5id: 15.10.2.12_A3_T2
description: a - z
---*/
var regexp_w = /\w/;
//CHECK#0061-007A
var result = true;
for (var alpha = 0x0061; alpha <= 0x007A; alpha++) {
var str = String.fromCharCode(alpha);
var arr = regexp_w.exec(str);
if ((arr === null) || (arr[0] !== str)) {
result = false;
}
}
if (result !== true) {
$ERROR('#1: a - z');
}

View File

@ -1,37 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: |
The production CharacterClassEscape :: w evaluates by returning the set of characters containing the sixty-three characters:
a - z, A - Z, 0 - 9, _
es5id: 15.10.2.12_A3_T3
description: 0 - 9, _
---*/
var regexp_w = /\w/;
//CHECK#0030-0039
var result = true;
for (var alpha = 0x0030; alpha <= 0x0039; alpha++) {
var str = String.fromCharCode(alpha);
var arr = regexp_w.exec(str);
if ((arr === null) || (arr[0] !== str)) {
result = false;
}
}
if (result !== true) {
$ERROR('#1: 0 - 9');
}
//CHECK#005F
var arr = regexp_w.exec("_");
if ((arr === null) || (arr[0] !== "\u005F")) {
$ERROR('#2: _');
}
//CHECK#0020
if (regexp_w.exec(" ") !== null) {
$ERROR('#3: ');
}

View File

@ -1,36 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: |
The production CharacterClassEscape :: w evaluates by returning the set of characters containing the sixty-three characters:
a - z, A - Z, 0 - 9, _
es5id: 15.10.2.12_A3_T4
description: RUSSIAN ALPHABET
---*/
var regexp_w = /\w/;
//CHECK#0410-042F
var result = true;
for (var alpha = 0x0410; alpha <= 0x042F; alpha++) {
if (regexp_w.exec(String.fromCharCode(alpha)) !== null) {
result = false;
}
}
if (result !== true) {
$ERROR('#1: RUSSIAN CAPITAL ALPHABET');
}
//CHECK#0430-044F
var result = true;
for (alpha = 0x0430; alpha <= 0x044F; alpha++) {
if (regexp_w.exec(String.fromCharCode(alpha)) !== null) {
result = false;
}
}
if (result !== true) {
$ERROR('#2: russian small alphabet');
}

View File

@ -1,522 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: |
The production CharacterClassEscape :: W evaluates by returning the set of all characters not
included in the set returned by CharacterClassEscape :: w
es5id: 15.10.2.12_A4_T1
description: A - Z
---*/
var i0 = "";
for (var j = 0; j < 1024; j++)
i0 += String.fromCharCode(j);
var o0 = "\u0030\u0031\u0032\u0033\u0034\u0035\u0036\u0037\u0038\u0039\u0041\u0042\u0043\u0044\u0045\u0046\u0047\u0048\u0049\u004A\u004B\u004C\u004D\u004E\u004F\u0050\u0051\u0052\u0053\u0054\u0055\u0056\u0057\u0058\u0059\u005A\u005F\u0061\u0062\u0063\u0064\u0065\u0066\u0067\u0068\u0069\u006A\u006B\u006C\u006D\u006E\u006F\u0070\u0071\u0072\u0073\u0074\u0075\u0076\u0077\u0078\u0079\u007A";
if (i0.replace(/\W+/g, "") !== o0) {
$ERROR("#0: Error matching character class \W between character 0 and 3ff");
}
var i1 = "";
for (var j = 1024; j < 2048; j++)
i1 += String.fromCharCode(j);
var o1 = "";
if (i1.replace(/\W+/g, "") !== o1) {
$ERROR("#1: Error matching character class \W between character 400 and 7ff");
}
var i2 = "";
for (var j = 2048; j < 3072; j++)
i2 += String.fromCharCode(j);
var o2 = "";
if (i2.replace(/\W+/g, "") !== o2) {
$ERROR("#2: Error matching character class \W between character 800 and bff");
}
var i3 = "";
for (var j = 3072; j < 4096; j++)
i3 += String.fromCharCode(j);
var o3 = "";
if (i3.replace(/\W+/g, "") !== o3) {
$ERROR("#3: Error matching character class \W between character c00 and fff");
}
var i4 = "";
for (var j = 4096; j < 5120; j++)
i4 += String.fromCharCode(j);
var o4 = "";
if (i4.replace(/\W+/g, "") !== o4) {
$ERROR("#4: Error matching character class \W between character 1000 and 13ff");
}
var i5 = "";
for (var j = 5120; j < 6144; j++)
i5 += String.fromCharCode(j);
var o5 = "";
if (i5.replace(/\W+/g, "") !== o5) {
$ERROR("#5: Error matching character class \W between character 1400 and 17ff");
}
var i6 = "";
for (var j = 6144; j < 7168; j++)
i6 += String.fromCharCode(j);
var o6 = "";
if (i6.replace(/\W+/g, "") !== o6) {
$ERROR("#6: Error matching character class \W between character 1800 and 1bff");
}
var i7 = "";
for (var j = 7168; j < 8192; j++)
i7 += String.fromCharCode(j);
var o7 = "";
if (i7.replace(/\W+/g, "") !== o7) {
$ERROR("#7: Error matching character class \W between character 1c00 and 1fff");
}
var i8 = "";
for (var j = 8192; j < 9216; j++)
i8 += String.fromCharCode(j);
var o8 = "";
if (i8.replace(/\W+/g, "") !== o8) {
$ERROR("#8: Error matching character class \W between character 2000 and 23ff");
}
var i9 = "";
for (var j = 9216; j < 10240; j++)
i9 += String.fromCharCode(j);
var o9 = "";
if (i9.replace(/\W+/g, "") !== o9) {
$ERROR("#9: Error matching character class \W between character 2400 and 27ff");
}
var i10 = "";
for (var j = 10240; j < 11264; j++)
i10 += String.fromCharCode(j);
var o10 = "";
if (i10.replace(/\W+/g, "") !== o10) {
$ERROR("#10: Error matching character class \W between character 2800 and 2bff");
}
var i11 = "";
for (var j = 11264; j < 12288; j++)
i11 += String.fromCharCode(j);
var o11 = "";
if (i11.replace(/\W+/g, "") !== o11) {
$ERROR("#11: Error matching character class \W between character 2c00 and 2fff");
}
var i12 = "";
for (var j = 12288; j < 13312; j++)
i12 += String.fromCharCode(j);
var o12 = "";
if (i12.replace(/\W+/g, "") !== o12) {
$ERROR("#12: Error matching character class \W between character 3000 and 33ff");
}
var i13 = "";
for (var j = 13312; j < 14336; j++)
i13 += String.fromCharCode(j);
var o13 = "";
if (i13.replace(/\W+/g, "") !== o13) {
$ERROR("#13: Error matching character class \W between character 3400 and 37ff");
}
var i14 = "";
for (var j = 14336; j < 15360; j++)
i14 += String.fromCharCode(j);
var o14 = "";
if (i14.replace(/\W+/g, "") !== o14) {
$ERROR("#14: Error matching character class \W between character 3800 and 3bff");
}
var i15 = "";
for (var j = 15360; j < 16384; j++)
i15 += String.fromCharCode(j);
var o15 = "";
if (i15.replace(/\W+/g, "") !== o15) {
$ERROR("#15: Error matching character class \W between character 3c00 and 3fff");
}
var i16 = "";
for (var j = 16384; j < 17408; j++)
i16 += String.fromCharCode(j);
var o16 = "";
if (i16.replace(/\W+/g, "") !== o16) {
$ERROR("#16: Error matching character class \W between character 4000 and 43ff");
}
var i17 = "";
for (var j = 17408; j < 18432; j++)
i17 += String.fromCharCode(j);
var o17 = "";
if (i17.replace(/\W+/g, "") !== o17) {
$ERROR("#17: Error matching character class \W between character 4400 and 47ff");
}
var i18 = "";
for (var j = 18432; j < 19456; j++)
i18 += String.fromCharCode(j);
var o18 = "";
if (i18.replace(/\W+/g, "") !== o18) {
$ERROR("#18: Error matching character class \W between character 4800 and 4bff");
}
var i19 = "";
for (var j = 19456; j < 20480; j++)
i19 += String.fromCharCode(j);
var o19 = "";
if (i19.replace(/\W+/g, "") !== o19) {
$ERROR("#19: Error matching character class \W between character 4c00 and 4fff");
}
var i20 = "";
for (var j = 20480; j < 21504; j++)
i20 += String.fromCharCode(j);
var o20 = "";
if (i20.replace(/\W+/g, "") !== o20) {
$ERROR("#20: Error matching character class \W between character 5000 and 53ff");
}
var i21 = "";
for (var j = 21504; j < 22528; j++)
i21 += String.fromCharCode(j);
var o21 = "";
if (i21.replace(/\W+/g, "") !== o21) {
$ERROR("#21: Error matching character class \W between character 5400 and 57ff");
}
var i22 = "";
for (var j = 22528; j < 23552; j++)
i22 += String.fromCharCode(j);
var o22 = "";
if (i22.replace(/\W+/g, "") !== o22) {
$ERROR("#22: Error matching character class \W between character 5800 and 5bff");
}
var i23 = "";
for (var j = 23552; j < 24576; j++)
i23 += String.fromCharCode(j);
var o23 = "";
if (i23.replace(/\W+/g, "") !== o23) {
$ERROR("#23: Error matching character class \W between character 5c00 and 5fff");
}
var i24 = "";
for (var j = 24576; j < 25600; j++)
i24 += String.fromCharCode(j);
var o24 = "";
if (i24.replace(/\W+/g, "") !== o24) {
$ERROR("#24: Error matching character class \W between character 6000 and 63ff");
}
var i25 = "";
for (var j = 25600; j < 26624; j++)
i25 += String.fromCharCode(j);
var o25 = "";
if (i25.replace(/\W+/g, "") !== o25) {
$ERROR("#25: Error matching character class \W between character 6400 and 67ff");
}
var i26 = "";
for (var j = 26624; j < 27648; j++)
i26 += String.fromCharCode(j);
var o26 = "";
if (i26.replace(/\W+/g, "") !== o26) {
$ERROR("#26: Error matching character class \W between character 6800 and 6bff");
}
var i27 = "";
for (var j = 27648; j < 28672; j++)
i27 += String.fromCharCode(j);
var o27 = "";
if (i27.replace(/\W+/g, "") !== o27) {
$ERROR("#27: Error matching character class \W between character 6c00 and 6fff");
}
var i28 = "";
for (var j = 28672; j < 29696; j++)
i28 += String.fromCharCode(j);
var o28 = "";
if (i28.replace(/\W+/g, "") !== o28) {
$ERROR("#28: Error matching character class \W between character 7000 and 73ff");
}
var i29 = "";
for (var j = 29696; j < 30720; j++)
i29 += String.fromCharCode(j);
var o29 = "";
if (i29.replace(/\W+/g, "") !== o29) {
$ERROR("#29: Error matching character class \W between character 7400 and 77ff");
}
var i30 = "";
for (var j = 30720; j < 31744; j++)
i30 += String.fromCharCode(j);
var o30 = "";
if (i30.replace(/\W+/g, "") !== o30) {
$ERROR("#30: Error matching character class \W between character 7800 and 7bff");
}
var i31 = "";
for (var j = 31744; j < 32768; j++)
i31 += String.fromCharCode(j);
var o31 = "";
if (i31.replace(/\W+/g, "") !== o31) {
$ERROR("#31: Error matching character class \W between character 7c00 and 7fff");
}
var i32 = "";
for (var j = 32768; j < 33792; j++)
i32 += String.fromCharCode(j);
var o32 = "";
if (i32.replace(/\W+/g, "") !== o32) {
$ERROR("#32: Error matching character class \W between character 8000 and 83ff");
}
var i33 = "";
for (var j = 33792; j < 34816; j++)
i33 += String.fromCharCode(j);
var o33 = "";
if (i33.replace(/\W+/g, "") !== o33) {
$ERROR("#33: Error matching character class \W between character 8400 and 87ff");
}
var i34 = "";
for (var j = 34816; j < 35840; j++)
i34 += String.fromCharCode(j);
var o34 = "";
if (i34.replace(/\W+/g, "") !== o34) {
$ERROR("#34: Error matching character class \W between character 8800 and 8bff");
}
var i35 = "";
for (var j = 35840; j < 36864; j++)
i35 += String.fromCharCode(j);
var o35 = "";
if (i35.replace(/\W+/g, "") !== o35) {
$ERROR("#35: Error matching character class \W between character 8c00 and 8fff");
}
var i36 = "";
for (var j = 36864; j < 37888; j++)
i36 += String.fromCharCode(j);
var o36 = "";
if (i36.replace(/\W+/g, "") !== o36) {
$ERROR("#36: Error matching character class \W between character 9000 and 93ff");
}
var i37 = "";
for (var j = 37888; j < 38912; j++)
i37 += String.fromCharCode(j);
var o37 = "";
if (i37.replace(/\W+/g, "") !== o37) {
$ERROR("#37: Error matching character class \W between character 9400 and 97ff");
}
var i38 = "";
for (var j = 38912; j < 39936; j++)
i38 += String.fromCharCode(j);
var o38 = "";
if (i38.replace(/\W+/g, "") !== o38) {
$ERROR("#38: Error matching character class \W between character 9800 and 9bff");
}
var i39 = "";
for (var j = 39936; j < 40960; j++)
i39 += String.fromCharCode(j);
var o39 = "";
if (i39.replace(/\W+/g, "") !== o39) {
$ERROR("#39: Error matching character class \W between character 9c00 and 9fff");
}
var i40 = "";
for (var j = 40960; j < 41984; j++)
i40 += String.fromCharCode(j);
var o40 = "";
if (i40.replace(/\W+/g, "") !== o40) {
$ERROR("#40: Error matching character class \W between character a000 and a3ff");
}
var i41 = "";
for (var j = 41984; j < 43008; j++)
i41 += String.fromCharCode(j);
var o41 = "";
if (i41.replace(/\W+/g, "") !== o41) {
$ERROR("#41: Error matching character class \W between character a400 and a7ff");
}
var i42 = "";
for (var j = 43008; j < 44032; j++)
i42 += String.fromCharCode(j);
var o42 = "";
if (i42.replace(/\W+/g, "") !== o42) {
$ERROR("#42: Error matching character class \W between character a800 and abff");
}
var i43 = "";
for (var j = 44032; j < 45056; j++)
i43 += String.fromCharCode(j);
var o43 = "";
if (i43.replace(/\W+/g, "") !== o43) {
$ERROR("#43: Error matching character class \W between character ac00 and afff");
}
var i44 = "";
for (var j = 45056; j < 46080; j++)
i44 += String.fromCharCode(j);
var o44 = "";
if (i44.replace(/\W+/g, "") !== o44) {
$ERROR("#44: Error matching character class \W between character b000 and b3ff");
}
var i45 = "";
for (var j = 46080; j < 47104; j++)
i45 += String.fromCharCode(j);
var o45 = "";
if (i45.replace(/\W+/g, "") !== o45) {
$ERROR("#45: Error matching character class \W between character b400 and b7ff");
}
var i46 = "";
for (var j = 47104; j < 48128; j++)
i46 += String.fromCharCode(j);
var o46 = "";
if (i46.replace(/\W+/g, "") !== o46) {
$ERROR("#46: Error matching character class \W between character b800 and bbff");
}
var i47 = "";
for (var j = 48128; j < 49152; j++)
i47 += String.fromCharCode(j);
var o47 = "";
if (i47.replace(/\W+/g, "") !== o47) {
$ERROR("#47: Error matching character class \W between character bc00 and bfff");
}
var i48 = "";
for (var j = 49152; j < 50176; j++)
i48 += String.fromCharCode(j);
var o48 = "";
if (i48.replace(/\W+/g, "") !== o48) {
$ERROR("#48: Error matching character class \W between character c000 and c3ff");
}
var i49 = "";
for (var j = 50176; j < 51200; j++)
i49 += String.fromCharCode(j);
var o49 = "";
if (i49.replace(/\W+/g, "") !== o49) {
$ERROR("#49: Error matching character class \W between character c400 and c7ff");
}
var i50 = "";
for (var j = 51200; j < 52224; j++)
i50 += String.fromCharCode(j);
var o50 = "";
if (i50.replace(/\W+/g, "") !== o50) {
$ERROR("#50: Error matching character class \W between character c800 and cbff");
}
var i51 = "";
for (var j = 52224; j < 53248; j++)
i51 += String.fromCharCode(j);
var o51 = "";
if (i51.replace(/\W+/g, "") !== o51) {
$ERROR("#51: Error matching character class \W between character cc00 and cfff");
}
var i52 = "";
for (var j = 53248; j < 54272; j++)
i52 += String.fromCharCode(j);
var o52 = "";
if (i52.replace(/\W+/g, "") !== o52) {
$ERROR("#52: Error matching character class \W between character d000 and d3ff");
}
var i53 = "";
for (var j = 54272; j < 55296; j++)
i53 += String.fromCharCode(j);
var o53 = "";
if (i53.replace(/\W+/g, "") !== o53) {
$ERROR("#53: Error matching character class \W between character d400 and d7ff");
}
var i54 = "";
for (var j = 55296; j < 56320; j++)
i54 += String.fromCharCode(j);
var o54 = "";
if (i54.replace(/\W+/g, "") !== o54) {
$ERROR("#54: Error matching character class \W between character d800 and dbff");
}
var i55 = "";
for (var j = 56320; j < 57344; j++)
i55 += String.fromCharCode(j);
var o55 = "";
if (i55.replace(/\W+/g, "") !== o55) {
$ERROR("#55: Error matching character class \W between character dc00 and dfff");
}
var i56 = "";
for (var j = 57344; j < 58368; j++)
i56 += String.fromCharCode(j);
var o56 = "";
if (i56.replace(/\W+/g, "") !== o56) {
$ERROR("#56: Error matching character class \W between character e000 and e3ff");
}
var i57 = "";
for (var j = 58368; j < 59392; j++)
i57 += String.fromCharCode(j);
var o57 = "";
if (i57.replace(/\W+/g, "") !== o57) {
$ERROR("#57: Error matching character class \W between character e400 and e7ff");
}
var i58 = "";
for (var j = 59392; j < 60416; j++)
i58 += String.fromCharCode(j);
var o58 = "";
if (i58.replace(/\W+/g, "") !== o58) {
$ERROR("#58: Error matching character class \W between character e800 and ebff");
}
var i59 = "";
for (var j = 60416; j < 61440; j++)
i59 += String.fromCharCode(j);
var o59 = "";
if (i59.replace(/\W+/g, "") !== o59) {
$ERROR("#59: Error matching character class \W between character ec00 and efff");
}
var i60 = "";
for (var j = 61440; j < 62464; j++)
i60 += String.fromCharCode(j);
var o60 = "";
if (i60.replace(/\W+/g, "") !== o60) {
$ERROR("#60: Error matching character class \W between character f000 and f3ff");
}
var i61 = "";
for (var j = 62464; j < 63488; j++)
i61 += String.fromCharCode(j);
var o61 = "";
if (i61.replace(/\W+/g, "") !== o61) {
$ERROR("#61: Error matching character class \W between character f400 and f7ff");
}
var i62 = "";
for (var j = 63488; j < 64512; j++)
i62 += String.fromCharCode(j);
var o62 = "";
if (i62.replace(/\W+/g, "") !== o62) {
$ERROR("#62: Error matching character class \W between character f800 and fbff");
}
var i63 = "";
for (var j = 64512; j < 65536; j++)
i63 += String.fromCharCode(j);
var o63 = "";
if (i63.replace(/\W+/g, "") !== o63) {
$ERROR("#63: Error matching character class \W between character fc00 and ffff");
}

View File

@ -1,24 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: |
The production CharacterClassEscape :: W evaluates by returning the set of all characters not
included in the set returned by CharacterClassEscape :: w
es5id: 15.10.2.12_A4_T2
description: a - z
---*/
var regexp_W = /\W/;
//CHECK#0061-007A
var result = true;
for (var alpha = 0x0061; alpha <= 0x007A; alpha++) {
if (regexp_W.exec(String.fromCharCode(alpha)) !== null) {
result = false;
}
}
if (result !== true) {
$ERROR('#1: a - z');
}

View File

@ -1,35 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: |
The production CharacterClassEscape :: W evaluates by returning the set of all characters not
included in the set returned by CharacterClassEscape :: w
es5id: 15.10.2.12_A4_T3
description: 0 - 9
---*/
var regexp_W = /\W/;
//CHECK#0030-0039
var result = true;
for (var alpha = 0x0030; alpha <= 0x0039; alpha++) {
if (regexp_W.exec(String.fromCharCode(alpha)) !== null) {
result = false;
}
}
if (result !== true) {
$ERROR('#1: 0 - 9');
}
//CHECK#005F
if (regexp_W.exec("_") !== null) {
$ERROR('#2: _');
}
//CHECK#0020
var arr = regexp_W.exec(" ");
if ((arr === null) || (arr[0] !== "\u0020")) {
$ERROR('#2: ');
}

View File

@ -1,40 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: |
The production CharacterClassEscape :: W evaluates by returning the set of all characters not
included in the set returned by CharacterClassEscape :: w
es5id: 15.10.2.12_A4_T4
description: RUSSIAN ALPHABET
---*/
var regexp_W = /\W/;
//CHECK#0410-042F
var result = true;
for (var alpha = 0x0410; alpha <= 0x042F; alpha++) {
var str = String.fromCharCode(alpha);
var arr = regexp_W.exec(str);
if ((arr === null) || (arr[0] !== str)) {
result = false;
}
}
if (result !== true) {
$ERROR('#1: RUSSIAN CAPITAL ALPHABET');
}
//CHECK#0430-044F
var result = true;
for (alpha = 0x0430; alpha <= 0x044F; alpha++) {
str = String.fromCharCode(alpha);
arr = regexp_W.exec(str);
if ((arr === null) || (arr[0] !== str)) {
result = false;
}
}
if (result !== true) {
$ERROR('#2: russian small alphabet');
}

File diff suppressed because one or more lines are too long

View File

@ -1,37 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: |
The production CharacterClassEscape :: d evaluates by returning the
ten-element set of characters containing the characters 0 through 9
inclusive
es5id: 15.10.2.12_A5_T2
description: ENGLISH ALPHABET
---*/
var regexp_d = /\d/;
//CHECK#0041-005A
var result = true;
for (var alpha = 0x0041; alpha <= 0x005A; alpha++) {
if (regexp_d.exec(String.fromCharCode(alpha)) !== null) {
result = false;
}
}
if (result !== true) {
$ERROR('#1: ENGLISH CAPITAL ALPHABET');
}
//CHECK#0061-007A
var result = true;
for (alpha = 0x0061; alpha <= 0x007A; alpha++) {
if (regexp_d.exec(String.fromCharCode(alpha)) !== null) {
result = false;
}
}
if (result !== true) {
$ERROR('#2: english small alphabet');
}

View File

@ -1,37 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: |
The production CharacterClassEscape :: d evaluates by returning the
ten-element set of characters containing the characters 0 through 9
inclusive
es5id: 15.10.2.12_A5_T3
description: RUSSIAN ALPHABET
---*/
var regexp_d = /\d/;
//CHECK#0410-042F
var result = true;
for (var alpha = 0x0410; alpha <= 0x042F; alpha++) {
if (regexp_d.exec(String.fromCharCode(alpha)) !== null) {
result = false;
}
}
if (result !== true) {
$ERROR('#1: RUSSIAN CAPITAL ALPHABET');
}
//CHECK#0430-044F
var result = true;
for (alpha = 0x0430; alpha <= 0x044F; alpha++) {
if (regexp_d.exec(String.fromCharCode(alpha)) !== null) {
result = false;
}
}
if (result !== true) {
$ERROR('#2: russian small alphabet');
}

View File

@ -1,29 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: |
The production CharacterClassEscape :: d evaluates by returning the
ten-element set of characters containing the characters 0 through 9
inclusive
es5id: 15.10.2.12_A5_T4
description: non-d
---*/
//CHECK#1
var non_d = "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\f\n\r\t\v~`!@#$%^&*()-+={[}]|\\:;'<,>./? " + '"';
if (/\d/.exec(non_d) !== null) {
$ERROR('#1: non-d');
}
//CHECK#2
var non_D = '0123456789';
var regexp_d = /\d/g;
var k = 0;
while (regexp_d.exec(non_D) !== null) {
k++;
}
if (non_D.length !== k) {
$ERROR('#2: non-D');
}

View File

@ -1,522 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: |
The production CharacterClassEscape :: D evaluates by returning the set of all characters not
included in the set returned by CharacterClassEscape :: d
es5id: 15.10.2.12_A6_T1
description: 0 - 9
---*/
var i0 = "";
for (var j = 0; j < 1024; j++)
i0 += String.fromCharCode(j);
var o0 = "\u0030\u0031\u0032\u0033\u0034\u0035\u0036\u0037\u0038\u0039";
if (i0.replace(/\D+/g, "") !== o0) {
$ERROR("#0: Error matching character class \D between character 0 and 3ff");
}
var i1 = "";
for (var j = 1024; j < 2048; j++)
i1 += String.fromCharCode(j);
var o1 = "";
if (i1.replace(/\D+/g, "") !== o1) {
$ERROR("#1: Error matching character class \D between character 400 and 7ff");
}
var i2 = "";
for (var j = 2048; j < 3072; j++)
i2 += String.fromCharCode(j);
var o2 = "";
if (i2.replace(/\D+/g, "") !== o2) {
$ERROR("#2: Error matching character class \D between character 800 and bff");
}
var i3 = "";
for (var j = 3072; j < 4096; j++)
i3 += String.fromCharCode(j);
var o3 = "";
if (i3.replace(/\D+/g, "") !== o3) {
$ERROR("#3: Error matching character class \D between character c00 and fff");
}
var i4 = "";
for (var j = 4096; j < 5120; j++)
i4 += String.fromCharCode(j);
var o4 = "";
if (i4.replace(/\D+/g, "") !== o4) {
$ERROR("#4: Error matching character class \D between character 1000 and 13ff");
}
var i5 = "";
for (var j = 5120; j < 6144; j++)
i5 += String.fromCharCode(j);
var o5 = "";
if (i5.replace(/\D+/g, "") !== o5) {
$ERROR("#5: Error matching character class \D between character 1400 and 17ff");
}
var i6 = "";
for (var j = 6144; j < 7168; j++)
i6 += String.fromCharCode(j);
var o6 = "";
if (i6.replace(/\D+/g, "") !== o6) {
$ERROR("#6: Error matching character class \D between character 1800 and 1bff");
}
var i7 = "";
for (var j = 7168; j < 8192; j++)
i7 += String.fromCharCode(j);
var o7 = "";
if (i7.replace(/\D+/g, "") !== o7) {
$ERROR("#7: Error matching character class \D between character 1c00 and 1fff");
}
var i8 = "";
for (var j = 8192; j < 9216; j++)
i8 += String.fromCharCode(j);
var o8 = "";
if (i8.replace(/\D+/g, "") !== o8) {
$ERROR("#8: Error matching character class \D between character 2000 and 23ff");
}
var i9 = "";
for (var j = 9216; j < 10240; j++)
i9 += String.fromCharCode(j);
var o9 = "";
if (i9.replace(/\D+/g, "") !== o9) {
$ERROR("#9: Error matching character class \D between character 2400 and 27ff");
}
var i10 = "";
for (var j = 10240; j < 11264; j++)
i10 += String.fromCharCode(j);
var o10 = "";
if (i10.replace(/\D+/g, "") !== o10) {
$ERROR("#10: Error matching character class \D between character 2800 and 2bff");
}
var i11 = "";
for (var j = 11264; j < 12288; j++)
i11 += String.fromCharCode(j);
var o11 = "";
if (i11.replace(/\D+/g, "") !== o11) {
$ERROR("#11: Error matching character class \D between character 2c00 and 2fff");
}
var i12 = "";
for (var j = 12288; j < 13312; j++)
i12 += String.fromCharCode(j);
var o12 = "";
if (i12.replace(/\D+/g, "") !== o12) {
$ERROR("#12: Error matching character class \D between character 3000 and 33ff");
}
var i13 = "";
for (var j = 13312; j < 14336; j++)
i13 += String.fromCharCode(j);
var o13 = "";
if (i13.replace(/\D+/g, "") !== o13) {
$ERROR("#13: Error matching character class \D between character 3400 and 37ff");
}
var i14 = "";
for (var j = 14336; j < 15360; j++)
i14 += String.fromCharCode(j);
var o14 = "";
if (i14.replace(/\D+/g, "") !== o14) {
$ERROR("#14: Error matching character class \D between character 3800 and 3bff");
}
var i15 = "";
for (var j = 15360; j < 16384; j++)
i15 += String.fromCharCode(j);
var o15 = "";
if (i15.replace(/\D+/g, "") !== o15) {
$ERROR("#15: Error matching character class \D between character 3c00 and 3fff");
}
var i16 = "";
for (var j = 16384; j < 17408; j++)
i16 += String.fromCharCode(j);
var o16 = "";
if (i16.replace(/\D+/g, "") !== o16) {
$ERROR("#16: Error matching character class \D between character 4000 and 43ff");
}
var i17 = "";
for (var j = 17408; j < 18432; j++)
i17 += String.fromCharCode(j);
var o17 = "";
if (i17.replace(/\D+/g, "") !== o17) {
$ERROR("#17: Error matching character class \D between character 4400 and 47ff");
}
var i18 = "";
for (var j = 18432; j < 19456; j++)
i18 += String.fromCharCode(j);
var o18 = "";
if (i18.replace(/\D+/g, "") !== o18) {
$ERROR("#18: Error matching character class \D between character 4800 and 4bff");
}
var i19 = "";
for (var j = 19456; j < 20480; j++)
i19 += String.fromCharCode(j);
var o19 = "";
if (i19.replace(/\D+/g, "") !== o19) {
$ERROR("#19: Error matching character class \D between character 4c00 and 4fff");
}
var i20 = "";
for (var j = 20480; j < 21504; j++)
i20 += String.fromCharCode(j);
var o20 = "";
if (i20.replace(/\D+/g, "") !== o20) {
$ERROR("#20: Error matching character class \D between character 5000 and 53ff");
}
var i21 = "";
for (var j = 21504; j < 22528; j++)
i21 += String.fromCharCode(j);
var o21 = "";
if (i21.replace(/\D+/g, "") !== o21) {
$ERROR("#21: Error matching character class \D between character 5400 and 57ff");
}
var i22 = "";
for (var j = 22528; j < 23552; j++)
i22 += String.fromCharCode(j);
var o22 = "";
if (i22.replace(/\D+/g, "") !== o22) {
$ERROR("#22: Error matching character class \D between character 5800 and 5bff");
}
var i23 = "";
for (var j = 23552; j < 24576; j++)
i23 += String.fromCharCode(j);
var o23 = "";
if (i23.replace(/\D+/g, "") !== o23) {
$ERROR("#23: Error matching character class \D between character 5c00 and 5fff");
}
var i24 = "";
for (var j = 24576; j < 25600; j++)
i24 += String.fromCharCode(j);
var o24 = "";
if (i24.replace(/\D+/g, "") !== o24) {
$ERROR("#24: Error matching character class \D between character 6000 and 63ff");
}
var i25 = "";
for (var j = 25600; j < 26624; j++)
i25 += String.fromCharCode(j);
var o25 = "";
if (i25.replace(/\D+/g, "") !== o25) {
$ERROR("#25: Error matching character class \D between character 6400 and 67ff");
}
var i26 = "";
for (var j = 26624; j < 27648; j++)
i26 += String.fromCharCode(j);
var o26 = "";
if (i26.replace(/\D+/g, "") !== o26) {
$ERROR("#26: Error matching character class \D between character 6800 and 6bff");
}
var i27 = "";
for (var j = 27648; j < 28672; j++)
i27 += String.fromCharCode(j);
var o27 = "";
if (i27.replace(/\D+/g, "") !== o27) {
$ERROR("#27: Error matching character class \D between character 6c00 and 6fff");
}
var i28 = "";
for (var j = 28672; j < 29696; j++)
i28 += String.fromCharCode(j);
var o28 = "";
if (i28.replace(/\D+/g, "") !== o28) {
$ERROR("#28: Error matching character class \D between character 7000 and 73ff");
}
var i29 = "";
for (var j = 29696; j < 30720; j++)
i29 += String.fromCharCode(j);
var o29 = "";
if (i29.replace(/\D+/g, "") !== o29) {
$ERROR("#29: Error matching character class \D between character 7400 and 77ff");
}
var i30 = "";
for (var j = 30720; j < 31744; j++)
i30 += String.fromCharCode(j);
var o30 = "";
if (i30.replace(/\D+/g, "") !== o30) {
$ERROR("#30: Error matching character class \D between character 7800 and 7bff");
}
var i31 = "";
for (var j = 31744; j < 32768; j++)
i31 += String.fromCharCode(j);
var o31 = "";
if (i31.replace(/\D+/g, "") !== o31) {
$ERROR("#31: Error matching character class \D between character 7c00 and 7fff");
}
var i32 = "";
for (var j = 32768; j < 33792; j++)
i32 += String.fromCharCode(j);
var o32 = "";
if (i32.replace(/\D+/g, "") !== o32) {
$ERROR("#32: Error matching character class \D between character 8000 and 83ff");
}
var i33 = "";
for (var j = 33792; j < 34816; j++)
i33 += String.fromCharCode(j);
var o33 = "";
if (i33.replace(/\D+/g, "") !== o33) {
$ERROR("#33: Error matching character class \D between character 8400 and 87ff");
}
var i34 = "";
for (var j = 34816; j < 35840; j++)
i34 += String.fromCharCode(j);
var o34 = "";
if (i34.replace(/\D+/g, "") !== o34) {
$ERROR("#34: Error matching character class \D between character 8800 and 8bff");
}
var i35 = "";
for (var j = 35840; j < 36864; j++)
i35 += String.fromCharCode(j);
var o35 = "";
if (i35.replace(/\D+/g, "") !== o35) {
$ERROR("#35: Error matching character class \D between character 8c00 and 8fff");
}
var i36 = "";
for (var j = 36864; j < 37888; j++)
i36 += String.fromCharCode(j);
var o36 = "";
if (i36.replace(/\D+/g, "") !== o36) {
$ERROR("#36: Error matching character class \D between character 9000 and 93ff");
}
var i37 = "";
for (var j = 37888; j < 38912; j++)
i37 += String.fromCharCode(j);
var o37 = "";
if (i37.replace(/\D+/g, "") !== o37) {
$ERROR("#37: Error matching character class \D between character 9400 and 97ff");
}
var i38 = "";
for (var j = 38912; j < 39936; j++)
i38 += String.fromCharCode(j);
var o38 = "";
if (i38.replace(/\D+/g, "") !== o38) {
$ERROR("#38: Error matching character class \D between character 9800 and 9bff");
}
var i39 = "";
for (var j = 39936; j < 40960; j++)
i39 += String.fromCharCode(j);
var o39 = "";
if (i39.replace(/\D+/g, "") !== o39) {
$ERROR("#39: Error matching character class \D between character 9c00 and 9fff");
}
var i40 = "";
for (var j = 40960; j < 41984; j++)
i40 += String.fromCharCode(j);
var o40 = "";
if (i40.replace(/\D+/g, "") !== o40) {
$ERROR("#40: Error matching character class \D between character a000 and a3ff");
}
var i41 = "";
for (var j = 41984; j < 43008; j++)
i41 += String.fromCharCode(j);
var o41 = "";
if (i41.replace(/\D+/g, "") !== o41) {
$ERROR("#41: Error matching character class \D between character a400 and a7ff");
}
var i42 = "";
for (var j = 43008; j < 44032; j++)
i42 += String.fromCharCode(j);
var o42 = "";
if (i42.replace(/\D+/g, "") !== o42) {
$ERROR("#42: Error matching character class \D between character a800 and abff");
}
var i43 = "";
for (var j = 44032; j < 45056; j++)
i43 += String.fromCharCode(j);
var o43 = "";
if (i43.replace(/\D+/g, "") !== o43) {
$ERROR("#43: Error matching character class \D between character ac00 and afff");
}
var i44 = "";
for (var j = 45056; j < 46080; j++)
i44 += String.fromCharCode(j);
var o44 = "";
if (i44.replace(/\D+/g, "") !== o44) {
$ERROR("#44: Error matching character class \D between character b000 and b3ff");
}
var i45 = "";
for (var j = 46080; j < 47104; j++)
i45 += String.fromCharCode(j);
var o45 = "";
if (i45.replace(/\D+/g, "") !== o45) {
$ERROR("#45: Error matching character class \D between character b400 and b7ff");
}
var i46 = "";
for (var j = 47104; j < 48128; j++)
i46 += String.fromCharCode(j);
var o46 = "";
if (i46.replace(/\D+/g, "") !== o46) {
$ERROR("#46: Error matching character class \D between character b800 and bbff");
}
var i47 = "";
for (var j = 48128; j < 49152; j++)
i47 += String.fromCharCode(j);
var o47 = "";
if (i47.replace(/\D+/g, "") !== o47) {
$ERROR("#47: Error matching character class \D between character bc00 and bfff");
}
var i48 = "";
for (var j = 49152; j < 50176; j++)
i48 += String.fromCharCode(j);
var o48 = "";
if (i48.replace(/\D+/g, "") !== o48) {
$ERROR("#48: Error matching character class \D between character c000 and c3ff");
}
var i49 = "";
for (var j = 50176; j < 51200; j++)
i49 += String.fromCharCode(j);
var o49 = "";
if (i49.replace(/\D+/g, "") !== o49) {
$ERROR("#49: Error matching character class \D between character c400 and c7ff");
}
var i50 = "";
for (var j = 51200; j < 52224; j++)
i50 += String.fromCharCode(j);
var o50 = "";
if (i50.replace(/\D+/g, "") !== o50) {
$ERROR("#50: Error matching character class \D between character c800 and cbff");
}
var i51 = "";
for (var j = 52224; j < 53248; j++)
i51 += String.fromCharCode(j);
var o51 = "";
if (i51.replace(/\D+/g, "") !== o51) {
$ERROR("#51: Error matching character class \D between character cc00 and cfff");
}
var i52 = "";
for (var j = 53248; j < 54272; j++)
i52 += String.fromCharCode(j);
var o52 = "";
if (i52.replace(/\D+/g, "") !== o52) {
$ERROR("#52: Error matching character class \D between character d000 and d3ff");
}
var i53 = "";
for (var j = 54272; j < 55296; j++)
i53 += String.fromCharCode(j);
var o53 = "";
if (i53.replace(/\D+/g, "") !== o53) {
$ERROR("#53: Error matching character class \D between character d400 and d7ff");
}
var i54 = "";
for (var j = 55296; j < 56320; j++)
i54 += String.fromCharCode(j);
var o54 = "";
if (i54.replace(/\D+/g, "") !== o54) {
$ERROR("#54: Error matching character class \D between character d800 and dbff");
}
var i55 = "";
for (var j = 56320; j < 57344; j++)
i55 += String.fromCharCode(j);
var o55 = "";
if (i55.replace(/\D+/g, "") !== o55) {
$ERROR("#55: Error matching character class \D between character dc00 and dfff");
}
var i56 = "";
for (var j = 57344; j < 58368; j++)
i56 += String.fromCharCode(j);
var o56 = "";
if (i56.replace(/\D+/g, "") !== o56) {
$ERROR("#56: Error matching character class \D between character e000 and e3ff");
}
var i57 = "";
for (var j = 58368; j < 59392; j++)
i57 += String.fromCharCode(j);
var o57 = "";
if (i57.replace(/\D+/g, "") !== o57) {
$ERROR("#57: Error matching character class \D between character e400 and e7ff");
}
var i58 = "";
for (var j = 59392; j < 60416; j++)
i58 += String.fromCharCode(j);
var o58 = "";
if (i58.replace(/\D+/g, "") !== o58) {
$ERROR("#58: Error matching character class \D between character e800 and ebff");
}
var i59 = "";
for (var j = 60416; j < 61440; j++)
i59 += String.fromCharCode(j);
var o59 = "";
if (i59.replace(/\D+/g, "") !== o59) {
$ERROR("#59: Error matching character class \D between character ec00 and efff");
}
var i60 = "";
for (var j = 61440; j < 62464; j++)
i60 += String.fromCharCode(j);
var o60 = "";
if (i60.replace(/\D+/g, "") !== o60) {
$ERROR("#60: Error matching character class \D between character f000 and f3ff");
}
var i61 = "";
for (var j = 62464; j < 63488; j++)
i61 += String.fromCharCode(j);
var o61 = "";
if (i61.replace(/\D+/g, "") !== o61) {
$ERROR("#61: Error matching character class \D between character f400 and f7ff");
}
var i62 = "";
for (var j = 63488; j < 64512; j++)
i62 += String.fromCharCode(j);
var o62 = "";
if (i62.replace(/\D+/g, "") !== o62) {
$ERROR("#62: Error matching character class \D between character f800 and fbff");
}
var i63 = "";
for (var j = 64512; j < 65536; j++)
i63 += String.fromCharCode(j);
var o63 = "";
if (i63.replace(/\D+/g, "") !== o63) {
$ERROR("#63: Error matching character class \D between character fc00 and ffff");
}

View File

@ -1,40 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: |
The production CharacterClassEscape :: D evaluates by returning the set of all characters not
included in the set returned by CharacterClassEscape :: d
es5id: 15.10.2.12_A6_T2
description: ENGLISH ALPHABET
---*/
var regexp_D = /\D/;
//CHECK#0041-005A
var result = true;
for (var alpha = 0x0041; alpha <= 0x005A; alpha++) {
var str = String.fromCharCode(alpha);
var arr = regexp_D.exec(str);
if ((arr === null) || (arr[0] !== str)) {
result = false;
}
}
if (result !== true) {
$ERROR('#1: ENGLISH CAPITAL ALPHABET');
}
//CHECK#0061-007A
var result = true;
for (alpha = 0x0061; alpha <= 0x007A; alpha++) {
str = String.fromCharCode(alpha);
arr = regexp_D.exec(str);
if ((arr === null) || (arr[0] !== str)) {
result = false;
}
}
if (result !== true) {
$ERROR('#2: english small alphabet');
}

View File

@ -1,40 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: |
The production CharacterClassEscape :: D evaluates by returning the set of all characters not
included in the set returned by CharacterClassEscape :: d
es5id: 15.10.2.12_A6_T3
description: RUSSIAN ALPHABET
---*/
var regexp_D = /\D/;
//CHECK#0410-042F
var result = true;
for (var alpha = 0x0410; alpha <= 0x042F; alpha++) {
var str = String.fromCharCode(alpha);
var arr = regexp_D.exec(str);
if ((arr === null) || (arr[0] !== str)) {
result = false;
}
}
if (result !== true) {
$ERROR('#1: RUSSIAN CAPITAL ALPHABET');
}
//CHECK#0430-044F
var result = true;
for (alpha = 0x0430; alpha <= 0x044F; alpha++) {
str = String.fromCharCode(alpha);
arr = regexp_D.exec(str);
if ((arr === null) || (arr[0] !== str)) {
result = false;
}
}
if (result !== true) {
$ERROR('#2: russian small alphabet');
}

View File

@ -1,28 +0,0 @@
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: |
The production CharacterClassEscape :: D evaluates by returning the set of all characters not
included in the set returned by CharacterClassEscape :: d
es5id: 15.10.2.12_A6_T4
description: RUSSIAN ALPHABET
---*/
//CHECK#1
var non_d = "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\f\n\r\t\v~`!@#$%^&*()-+={[}]|\\:;'<,>./? " + '"';
var regexp_D = /\D/g;
var k = 0;
while (regexp_D.exec(non_d) !== null) {
k++;
}
if (non_d.length !== k) {
$ERROR('#1: non-d');
}
//CHECK#2
var non_d = '0123456789';
if (/\D/.exec(non_d) !== null) {
$ERROR('#2: non-d');
}