summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/es6/templates.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/mjsunit/es6/templates.js')
-rw-r--r--deps/v8/test/mjsunit/es6/templates.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/deps/v8/test/mjsunit/es6/templates.js b/deps/v8/test/mjsunit/es6/templates.js
index 621b06074e..3c4584d337 100644
--- a/deps/v8/test/mjsunit/es6/templates.js
+++ b/deps/v8/test/mjsunit/es6/templates.js
@@ -697,3 +697,22 @@ var global = this;
assertArrayEquals(["get0"], log);
assertArrayEquals([1], tagged);
})();
+
+
+// Since the first argument to the tag function is always an array,
+// eval calls will always just return that array.
+(function testEvalTagStrict() {
+ "use strict";
+ var f = (x) => eval`a${x}b`;
+ var result = f();
+ assertEquals(["a", "b"], result);
+ assertSame(result, f());
+})();
+
+
+(function testEvalTagSloppy() {
+ var f = (x) => eval`a${x}b`;
+ var result = f();
+ assertEquals(["a", "b"], result);
+ assertSame(result, f());
+})();