mirror of https://github.com/tc39/test262.git
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.
This commit is contained in:
parent
4f1e628107
commit
ccaa9571ea
|
@ -6,9 +6,14 @@ es5id: 7.8.4-1-s
|
|||
description: >
|
||||
A directive preceeding an 'use strict' directive may not contain
|
||||
an OctalEscapeSequence
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
|
||||
assert.throws(SyntaxError, function() {
|
||||
eval(' "asterisk: \\052" /* octal escape sequences forbidden in strict mode*/ ; "use strict";');
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
(function() {
|
||||
"asterisk: \052";
|
||||
"use strict";
|
||||
});
|
Loading…
Reference in New Issue