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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
464 | 464 |
465 { | 465 { |
466 // block | 466 // block |
467 } | 467 } |
468 `ghi`; | 468 `ghi`; |
469 | 469 |
470 { | 470 { |
471 // block | 471 // block |
472 }`jkl`; | 472 }`jkl`; |
473 })(); | 473 })(); |
474 | |
475 | |
476 (function testLegacyOctal() { | |
477 assertEquals('\u0000', `\0`); | |
478 assertEquals('\u00001', `\01`); | |
479 assertEquals('\u000012', `\012`); | |
caitp (gmail)
2014/12/17 18:04:59
Few other things:
"\0a" matches the grammar `Esca
| |
480 assertEquals('123', `\123`); | |
481 | |
482 assertEquals('\\0', String.raw`\0`); | |
483 assertEquals('\\01', String.raw`\01`); | |
484 assertEquals('\\012', String.raw`\012`); | |
485 assertEquals('\\123', String.raw`\123`); | |
486 })(); | |
OLD | NEW |