Index: test/mjsunit/es6/templates.js |
diff --git a/test/mjsunit/es6/templates.js b/test/mjsunit/es6/templates.js |
index 621b06074eeaf7c838c09057fea935484a175fe0..3c4584d33799a7cacb545c942ebbfac8f2d1a648 100644 |
--- a/test/mjsunit/es6/templates.js |
+++ b/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()); |
+})(); |