tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

tv-line-continuation.js (1166B)


      1 // Copyright (C) 2014 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 es6id: 11.8.6.1
      5 description: Template values of line continuations
      6 info: |
      7    The TV of LineContinuation :: \ LineTerminatorSequence is the empty code
      8    unit sequence.
      9    The TRV of LineContinuation :: \ LineTerminatorSequence is the sequence
     10    consisting of the code unit value 0x005C followed by the code units of TRV
     11    of LineTerminatorSequence.
     12 ---*/
     13 
     14 var calls;
     15 
     16 calls = 0;
     17 (function(cs) {
     18  calls++;
     19  assert.sameValue(cs[0], '', 'Line Feed and Carriage Return');
     20  assert.sameValue(
     21    cs.raw[0], '\u005C\n\u005C\n\u005C\n', 'Line Feed and Carriage Return'
     22  );
     23 })`\
     24 \
     25 \`
     26 assert.sameValue(calls, 1);
     27 
     28 calls = 0;
     29 (function(cs) {
     30  calls++;
     31  assert.sameValue(cs[0], '', 'Line Separator');
     32  assert.sameValue(cs.raw[0], '\\\u2028', 'Line Separator');
     33 })`\`
     34 assert.sameValue(calls, 1);
     35 
     36 calls = 0;
     37 (function(cs) {
     38  calls++;
     39  assert.sameValue(cs[0], '', 'Paragraph Separater');
     40  assert.sameValue(cs.raw[0], '\\\u2029', 'Paragraph Separator');
     41 })`\`
     42 assert.sameValue(calls, 1);
     43 
     44 reportCompare(0, 0);