tor-browser

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

tv-template-tail.js (937B)


      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 the template tail pattern
      6 info: |
      7    The TV and TRV of TemplateTail :: }` is the empty code unit sequence.
      8    The TV of TemplateTail :: } TemplateCharacters ` is the TV of
      9    TemplateCharacters.
     10    The TRV of TemplateTail :: } TemplateCharacters ` is the TRV of
     11    TemplateCharacters.
     12 ---*/
     13 
     14 var calls;
     15 
     16 calls = 0;
     17 (function(s) {
     18  calls++;
     19  assert.sameValue(s[1], '', 'Template value (empty)');
     20  assert.sameValue(s.raw[1], '', 'Template raw value (empty)');
     21 })`${1}`;
     22 assert.sameValue(calls, 1);
     23 
     24 calls = 0;
     25 (function(s) {
     26  calls++;
     27  assert.sameValue(s[1], 'foo', 'Template value (with content)');
     28  assert.sameValue(s.raw[1], 'foo', 'Template raw value (with content)');
     29 })`${1}foo`;
     30 assert.sameValue(calls, 1);
     31 
     32 reportCompare(0, 0);