tor-browser

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

tv-line-terminator-sequence.js (1393B)


      1 // Copyright (C) 2015 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 terminator sequences
      6 info: |
      7    The TV of TemplateCharacter :: LineTerminatorSequence is the TRV of
      8    LineTerminatorSequence.
      9    The TRV of LineTerminatorSequence :: <LF> is the code unit value 0x000A.
     10    The TRV of LineTerminatorSequence :: <CR> is the code unit value 0x000A.
     11    The TRV of LineTerminatorSequence :: <LS> is the code unit value 0x2028.
     12    The TRV of LineTerminatorSequence :: <PS> is the code unit value 0x2029.
     13    The TRV of LineTerminatorSequence :: <CR><LF> is the sequence consisting of
     14    the code unit value 0x000A.
     15 ---*/
     16 
     17 
     18 var calls;
     19 
     20 calls = 0;
     21 (function(s) {
     22  calls++;
     23  assert.sameValue(s[0], '\n\n\n', 'Line Feed and Carriage Return');
     24  assert.sameValue(s.raw[0], '\n\n\n', 'Line Feed and Carriage Return');
     25 })`
     26 
     27 `;
     28 assert.sameValue(calls, 1);
     29 
     30 calls = 0;
     31 (function(cs) {
     32  calls++;
     33  assert.sameValue(cs[0], '\u2028', 'Line Separator');
     34  assert.sameValue(cs.raw[0], '\u2028', 'Line Separator');
     35 })`
`
     36 assert.sameValue(calls, 1);
     37 
     38 calls = 0;
     39 (function(cs) {
     40  calls++;
     41  assert.sameValue(cs[0], '\u2029', 'Paragraph Separator');
     42  assert.sameValue(cs.raw[0], '\u2029', 'Paragraph Separator');
     43 })`
`
     44 assert.sameValue(calls, 1);
     45 
     46 reportCompare(0, 0);