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