tor-browser

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

argument-string-unknown-annotation.js (1017B)


      1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
      2 // Copyright (C) 2022 Igalia, S.L. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 esid: sec-temporal.plaindate.from
      7 description: Various forms of unknown annotation
      8 features: [Temporal]
      9 includes: [temporalHelpers.js]
     10 ---*/
     11 
     12 const tests = [
     13  ["2000-05-02[foo=bar]", "without time"],
     14  ["2000-05-02T15:23[foo=bar]", "alone"],
     15  ["2000-05-02T15:23[UTC][foo=bar]", "with time zone"],
     16  ["2000-05-02T15:23[u-ca=iso8601][foo=bar]", "with calendar"],
     17  ["2000-05-02T15:23[UTC][foo=bar][u-ca=iso8601]", "with time zone and calendar"],
     18  ["2000-05-02T15:23[foo=bar][_foo-bar0=Ignore-This-999999999999]", "with another unknown annotation"],
     19 ];
     20 
     21 tests.forEach(([arg, description]) => {
     22  const result = Temporal.PlainDate.from(arg);
     23 
     24  TemporalHelpers.assertPlainDate(
     25    result,
     26    2000, 5, "M05", 2,
     27    `unknown annotation (${description})`
     28  );
     29 });
     30 
     31 reportCompare(0, 0);