mirror of https://github.com/tc39/test262.git
Refactor LT tests for parsers: string
The tests for the parsing of line terminators were expressed using eval. This made the tests more complex than necessary and also prevented the tests from providing value to ECMAScript parsers. Remove the use of eval and instead express the expectations with literal source text.
This commit is contained in:
parent
10fb23049e
commit
f9ffa71c56
|
@ -4,9 +4,13 @@
|
|||
/*---
|
||||
info: CARRIAGE RETURN (U+000D) within strings is not allowed
|
||||
es5id: 7.3_A2.2_T1
|
||||
esid: sec-line-terminators
|
||||
description: Insert CARRIAGE RETURN (\u000D) into string
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
assert.throws(SyntaxError, function() {
|
||||
eval("'\u000Dstr\u000Ding\u000D'");
|
||||
});
|
||||
$DONOTEVALUATE();
|
||||
|
||||
'
'
|
|
@ -4,9 +4,14 @@
|
|||
/*---
|
||||
info: LINE FEED (U+000A) within strings is not allowed
|
||||
es5id: 7.3_A2.1_T1
|
||||
esid: sec-line-terminators
|
||||
description: Insert LINE FEED (\u000A) into string
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
assert.throws(SyntaxError, function() {
|
||||
eval("'\u000Astr\u000Aing\u000A'");
|
||||
});
|
||||
$DONOTEVALUATE();
|
||||
|
||||
'
|
||||
'
|
Loading…
Reference in New Issue