OLD | NEW |
---|---|
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Flags: --harmony-templates --harmony-unicode | 5 // Flags: --harmony-templates --harmony-unicode |
6 | 6 |
7 var num = 5; | 7 var num = 5; |
8 var str = "str"; | 8 var str = "str"; |
9 function fn() { return "result"; } | 9 function fn() { return "result"; } |
10 var obj = { | 10 var obj = { |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
446 function raw0(callSiteObj) { | 446 function raw0(callSiteObj) { |
447 return callSiteObj.raw[0]; | 447 return callSiteObj.raw[0]; |
448 } | 448 } |
449 assertEquals(raw0`a\u{62}c`, "a\\u{62}c"); | 449 assertEquals(raw0`a\u{62}c`, "a\\u{62}c"); |
450 assertEquals(raw0`a\u{000062}c`, "a\\u{000062}c"); | 450 assertEquals(raw0`a\u{000062}c`, "a\\u{000062}c"); |
451 assertEquals(raw0`a\u{0}c`, "a\\u{0}c"); | 451 assertEquals(raw0`a\u{0}c`, "a\\u{0}c"); |
452 | 452 |
453 assertEquals(`a\u{62}c`, "abc"); | 453 assertEquals(`a\u{62}c`, "abc"); |
454 assertEquals(`a\u{000062}c`, "abc"); | 454 assertEquals(`a\u{000062}c`, "abc"); |
455 })(); | 455 })(); |
456 | |
457 | |
458 (function testLiteralAfterRightBrace() { | |
459 // Regression test for https://code.google.com/p/v8/issues/detail?id=3734 | |
460 function f() {} | |
461 `abc`; | |
caitp (gmail)
2014/12/03 23:20:25
So "function f() {}`abc`;" would have failed befor
| |
462 | |
463 { | |
464 // block | |
465 } | |
466 `def`; | |
467 })(); | |
OLD | NEW |