Skip to content
Snippets Groups Projects
Commit ccaa9571 authored by Mike Pennisi's avatar Mike Pennisi Committed by Rick Waldron
Browse files

Refactor string literal test for parsers

Thsi test for the parsing of string literals was expressed using `eval`.
This made the test more complex than necessary and also prevented the
test from providing value to ECMAScript parsers.

Remove the use of `eval` and instead express the expectation with
literal source text.
parent 4f1e6281
No related branches found
No related tags found
No related merge requests found
...@@ -6,9 +6,14 @@ es5id: 7.8.4-1-s ...@@ -6,9 +6,14 @@ es5id: 7.8.4-1-s
description: > description: >
A directive preceeding an 'use strict' directive may not contain A directive preceeding an 'use strict' directive may not contain
an OctalEscapeSequence an OctalEscapeSequence
negative:
phase: parse
type: SyntaxError
---*/ ---*/
throw "Test262: This statement should not be evaluated.";
assert.throws(SyntaxError, function() {
eval(' "asterisk: \\052" /* octal escape sequences forbidden in strict mode*/ ; "use strict";'); (function() {
"asterisk: \052";
"use strict";
}); });
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