argument-string-unknown-annotation.js (966B)
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.compare 7 description: Various forms of unknown annotation 8 features: [Temporal] 9 ---*/ 10 11 const tests = [ 12 ["2000-05-02[foo=bar]", "without time"], 13 ["2000-05-02T15:23[foo=bar]", "alone"], 14 ["2000-05-02T15:23[UTC][foo=bar]", "with time zone"], 15 ["2000-05-02T15:23[u-ca=iso8601][foo=bar]", "with calendar"], 16 ["2000-05-02T15:23[UTC][foo=bar][u-ca=iso8601]", "with time zone and calendar"], 17 ["2000-05-02T15:23[foo=bar][_foo-bar0=Ignore-This-999999999999]", "with another unknown annotation"], 18 ]; 19 20 tests.forEach(([arg, description]) => { 21 const result = Temporal.PlainDate.compare(arg, arg); 22 23 assert.sameValue( 24 result, 25 0, 26 `unknown annotation (${description})` 27 ); 28 }); 29 30 reportCompare(0, 0);