mirror of
https://github.com/tc39/test262.git
synced 2025-07-21 13:04:39 +02:00
Restore migration to assert.sameValue
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
This commit is contained in:
parent
a2f44c7151
commit
d0ba3251d2
@ -42,17 +42,11 @@ for (let letter of invalidControls()) {
|
|||||||
var char = letter.charCodeAt(0);
|
var char = letter.charCodeAt(0);
|
||||||
var str = String.fromCharCode(char % 32);
|
var str = String.fromCharCode(char % 32);
|
||||||
var arr = re.exec(str);
|
var arr = re.exec(str);
|
||||||
|
assert.sameValue(arr, null, `Character ${letter} unreasonably wrapped around as a control character`);
|
||||||
|
}
|
||||||
|
arr = re.exec(source.substring(1));
|
||||||
|
assert.sameValue(arr, null, `invalid \\c escape matched c rather than \\c when followed by ${letter}`);
|
||||||
|
|
||||||
if (arr !== null) {
|
arr = re.exec(source);
|
||||||
$ERROR(`Character ${letter} unreasonably wrapped around as a control character`);
|
assert.notSameValue(arr, null, `invalid \\c escape failed to match \\c when followed by ${letter}`);
|
||||||
}
|
|
||||||
}
|
|
||||||
arr = re.exec(source.substring(1))
|
|
||||||
if (arr !== null) {
|
|
||||||
$ERROR(`invalid \\c escape matched c rather than \\c when followed by ${letter}`);
|
|
||||||
}
|
|
||||||
arr = re.exec(source)
|
|
||||||
if (arr === null) {
|
|
||||||
$ERROR(`invalid \\c escape failed to match \\c when followed by ${letter}`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user