| Index: test/mjsunit/harmony/templates.js
|
| diff --git a/test/mjsunit/harmony/templates.js b/test/mjsunit/harmony/templates.js
|
| index c339bb8cc7609f0eff03f84b85c790d036559ef1..a884f58fb657b31d2cce4e51dd39e7ed831dd73c 100644
|
| --- a/test/mjsunit/harmony/templates.js
|
| +++ b/test/mjsunit/harmony/templates.js
|
| @@ -505,3 +505,16 @@ var obj = {
|
| assertEquals("\u00008", `\08`);
|
| assertEquals("\u00009", `\09`);
|
| })();
|
| +
|
| +
|
| +(function testLegacyOctalEscapesInExpressions() {
|
| + // Allowed in sloppy expression
|
| + assertEquals("\x07", `${"\07"}`);
|
| +
|
| + // Disallowed in template tail
|
| + assertThrows("`${\"\\07\"}\\07`", SyntaxError);
|
| +
|
| + // Disallowed in strict expression
|
| + assertThrows("`${(function() { \"use strict\"; return \"\\07\"; })()}`",
|
| + SyntaxError);
|
| +})();
|
|
|