Skip to content
Snippets Groups Projects
Commit f9ffa71c authored by Mike Pennisi's avatar Mike Pennisi
Browse files

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.
parent 10fb2304
No related branches found
No related tags found
No related merge requests found
...@@ -4,9 +4,13 @@ ...@@ -4,9 +4,13 @@
/*--- /*---
info: CARRIAGE RETURN (U+000D) within strings is not allowed info: CARRIAGE RETURN (U+000D) within strings is not allowed
es5id: 7.3_A2.2_T1 es5id: 7.3_A2.2_T1
esid: sec-line-terminators
description: Insert CARRIAGE RETURN (\u000D) into string description: Insert CARRIAGE RETURN (\u000D) into string
negative:
phase: parse
type: SyntaxError
---*/ ---*/
assert.throws(SyntaxError, function() { $DONOTEVALUATE();
eval("'\u000Dstr\u000Ding\u000D'");
}); ''
......
...@@ -4,9 +4,14 @@ ...@@ -4,9 +4,14 @@
/*--- /*---
info: LINE FEED (U+000A) within strings is not allowed info: LINE FEED (U+000A) within strings is not allowed
es5id: 7.3_A2.1_T1 es5id: 7.3_A2.1_T1
esid: sec-line-terminators
description: Insert LINE FEED (\u000A) into string description: Insert LINE FEED (\u000A) into string
negative:
phase: parse
type: SyntaxError
---*/ ---*/
assert.throws(SyntaxError, function() { $DONOTEVALUATE();
eval("'\u000Astr\u000Aing\u000A'");
}); '
'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment