2015-07-17 17:34:33 +02:00
|
|
|
|
// Copyright (C) 2014 the V8 project authors. All rights reserved.
|
2015-03-30 23:36:38 +02:00
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
/*---
|
2015-06-12 17:02:07 +02:00
|
|
|
|
es6id: 11.8.6.1
|
|
|
|
|
description: Template values of line continuations
|
2018-01-05 18:26:51 +01:00
|
|
|
|
info: |
|
2015-06-11 19:19:07 +02:00
|
|
|
|
The TV of LineContinuation :: \ LineTerminatorSequence is the empty code
|
|
|
|
|
unit sequence.
|
2015-03-30 23:36:38 +02:00
|
|
|
|
The TRV of LineContinuation :: \ LineTerminatorSequence is the sequence
|
|
|
|
|
consisting of the code unit value 0x005C followed by the code units of TRV
|
|
|
|
|
of LineTerminatorSequence.
|
|
|
|
|
---*/
|
2015-06-11 19:19:07 +02:00
|
|
|
|
|
2015-03-30 23:36:38 +02:00
|
|
|
|
var calls;
|
|
|
|
|
|
|
|
|
|
calls = 0;
|
|
|
|
|
(function(cs) {
|
|
|
|
|
calls++;
|
2015-06-11 19:19:07 +02:00
|
|
|
|
assert.sameValue(cs[0], '', 'Line Feed and Carriage Return');
|
2015-04-15 16:47:15 +02:00
|
|
|
|
assert.sameValue(
|
|
|
|
|
cs.raw[0], '\u005C\n\u005C\n\u005C\n', 'Line Feed and Carriage Return'
|
|
|
|
|
);
|
2015-03-30 23:36:38 +02:00
|
|
|
|
})`\
|
|
|
|
|
\
|
|
|
|
|
\
`
|
|
|
|
|
assert.sameValue(calls, 1);
|
2015-04-15 16:47:15 +02:00
|
|
|
|
|
|
|
|
|
calls = 0;
|
|
|
|
|
(function(cs) {
|
|
|
|
|
calls++;
|
2015-06-11 19:19:07 +02:00
|
|
|
|
assert.sameValue(cs[0], '', 'Line Separator');
|
2015-04-15 16:47:15 +02:00
|
|
|
|
assert.sameValue(cs.raw[0], '\\\u2028', 'Line Separator');
|
|
|
|
|
})`\
`
|
|
|
|
|
assert.sameValue(calls, 1);
|
|
|
|
|
|
|
|
|
|
calls = 0;
|
|
|
|
|
(function(cs) {
|
|
|
|
|
calls++;
|
2015-06-11 19:19:07 +02:00
|
|
|
|
assert.sameValue(cs[0], '', 'Paragraph Separater');
|
2015-04-15 16:47:15 +02:00
|
|
|
|
assert.sameValue(cs.raw[0], '\\\u2029', 'Paragraph Separator');
|
|
|
|
|
})`\
`
|
|
|
|
|
assert.sameValue(calls, 1);
|