mirror of
https://github.com/tc39/test262.git
synced 2025-12-01 11:03:13 +01:00
Temporal: Test that "islamic" and "islamic-rgsa" calendars are unsupported
And remove the equivalent staging tests.
This commit is contained in:
parent
d2e25dcadc
commit
0df97508ff
15
test/intl402/Temporal/PlainDate/from/islamic-rgsa.js
Normal file
15
test/intl402/Temporal/PlainDate/from/islamic-rgsa.js
Normal file
@ -0,0 +1,15 @@
|
||||
// Copyright (C) 2025 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.plaindate.prototype.from
|
||||
description: "islamic-rgsa" calendar name is not supported
|
||||
features: [Temporal, Intl.Era-monthcode]
|
||||
---*/
|
||||
|
||||
const calendar = "islamic-rgsa";
|
||||
|
||||
assert.throws(RangeError, () =>
|
||||
Temporal.PlainDate.from({year: 1500, month: 1, day: 1, calendar}),
|
||||
"fallback for calendar ID 'islamic-rgsa' only supported in Intl.DateTimeFormat constructor, not Temporal"
|
||||
);
|
||||
15
test/intl402/Temporal/PlainDate/from/islamic.js
Normal file
15
test/intl402/Temporal/PlainDate/from/islamic.js
Normal file
@ -0,0 +1,15 @@
|
||||
// Copyright (C) 2025 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.plaindate.prototype.from
|
||||
description: "islamic" calendar name is not supported
|
||||
features: [Temporal, Intl.Era-monthcode]
|
||||
---*/
|
||||
|
||||
const calendar = "islamic";
|
||||
|
||||
assert.throws(RangeError, () =>
|
||||
Temporal.PlainDate.from({year: 1500, month: 1, day: 1, calendar}),
|
||||
"fallback for calendar ID 'islamic' only supported in Intl.DateTimeFormat constructor, not Temporal"
|
||||
);
|
||||
15
test/intl402/Temporal/PlainDateTime/from/islamic-rgsa.js
Normal file
15
test/intl402/Temporal/PlainDateTime/from/islamic-rgsa.js
Normal file
@ -0,0 +1,15 @@
|
||||
// Copyright (C) 2025 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.plaindatetime.prototype.from
|
||||
description: "islamic-rgsa" calendar name is not supported
|
||||
features: [Temporal, Intl.Era-monthcode]
|
||||
---*/
|
||||
|
||||
const calendar = "islamic-rgsa";
|
||||
|
||||
assert.throws(RangeError, () =>
|
||||
Temporal.PlainDateTime.from({year: 1500, month: 1, day: 1, hour: 12, minute: 34, calendar}),
|
||||
"fallback for calendar ID 'islamic-rgsa' only supported in Intl.DateTimeFormat constructor, not Temporal"
|
||||
);
|
||||
15
test/intl402/Temporal/PlainDateTime/from/islamic.js
Normal file
15
test/intl402/Temporal/PlainDateTime/from/islamic.js
Normal file
@ -0,0 +1,15 @@
|
||||
// Copyright (C) 2025 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.plaindatetime.prototype.from
|
||||
description: "islamic" calendar name is not supported
|
||||
features: [Temporal, Intl.Era-monthcode]
|
||||
---*/
|
||||
|
||||
const calendar = "islamic";
|
||||
|
||||
assert.throws(RangeError, () =>
|
||||
Temporal.PlainDateTime.from({year: 1500, month: 1, day: 1, calendar}),
|
||||
"fallback for calendar ID 'islamic' only supported in Intl.DateTimeFormat constructor, not Temporal"
|
||||
);
|
||||
15
test/intl402/Temporal/PlainMonthDay/from/islamic-rgsa.js
Normal file
15
test/intl402/Temporal/PlainMonthDay/from/islamic-rgsa.js
Normal file
@ -0,0 +1,15 @@
|
||||
// Copyright (C) 2025 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.plainmonthday.prototype.from
|
||||
description: "islamic-rgsa" calendar name is not supported
|
||||
features: [Temporal, Intl.Era-monthcode]
|
||||
---*/
|
||||
|
||||
const calendar = "islamic-rgsa";
|
||||
|
||||
assert.throws(RangeError, () =>
|
||||
Temporal.PlainMonthDay.from({month: 1, day: 1, calendar}),
|
||||
"fallback for calendar ID 'islamic-rgsa' only supported in Intl.DateTimeFormat constructor, not Temporal"
|
||||
);
|
||||
15
test/intl402/Temporal/PlainMonthDay/from/islamic.js
Normal file
15
test/intl402/Temporal/PlainMonthDay/from/islamic.js
Normal file
@ -0,0 +1,15 @@
|
||||
// Copyright (C) 2025 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.plainmonthday.prototype.from
|
||||
description: "islamic" calendar name is not supported
|
||||
features: [Temporal, Intl.Era-monthcode]
|
||||
---*/
|
||||
|
||||
const calendar = "islamic";
|
||||
|
||||
assert.throws(RangeError, () =>
|
||||
Temporal.PlainMonthDay.from({year: 1500, month: 1, day: 1, calendar}),
|
||||
"fallback for calendar ID 'islamic' only supported in Intl.DateTimeFormat constructor, not Temporal"
|
||||
);
|
||||
15
test/intl402/Temporal/PlainYearMonth/from/islamic-rgsa.js
Normal file
15
test/intl402/Temporal/PlainYearMonth/from/islamic-rgsa.js
Normal file
@ -0,0 +1,15 @@
|
||||
// Copyright (C) 2025 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.plainyearmonth.prototype.from
|
||||
description: "islamic-rgsa" calendar name is not supported
|
||||
features: [Temporal, Intl.Era-monthcode]
|
||||
---*/
|
||||
|
||||
const calendar = "islamic-rgsa";
|
||||
|
||||
assert.throws(RangeError, () =>
|
||||
Temporal.PlainYearMonth.from({year: 1500, month: 1, calendar}),
|
||||
"fallback for calendar ID 'islamic-rgsa' only supported in Intl.DateTimeFormat constructor, not Temporal"
|
||||
);
|
||||
15
test/intl402/Temporal/PlainYearMonth/from/islamic.js
Normal file
15
test/intl402/Temporal/PlainYearMonth/from/islamic.js
Normal file
@ -0,0 +1,15 @@
|
||||
// Copyright (C) 2025 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.plainyearmonth.prototype.from
|
||||
description: "islamic" calendar name is not supported
|
||||
features: [Temporal, Intl.Era-monthcode]
|
||||
---*/
|
||||
|
||||
const calendar = "islamic";
|
||||
|
||||
assert.throws(RangeError, () =>
|
||||
Temporal.PlainYearMonth.from({year: 1500, month: 1, day: 1, calendar}),
|
||||
"fallback for calendar ID 'islamic' only supported in Intl.DateTimeFormat constructor, not Temporal"
|
||||
);
|
||||
15
test/intl402/Temporal/ZonedDateTime/from/islamic-rgsa.js
Normal file
15
test/intl402/Temporal/ZonedDateTime/from/islamic-rgsa.js
Normal file
@ -0,0 +1,15 @@
|
||||
// Copyright (C) 2025 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.zoneddatetime.prototype.from
|
||||
description: "islamic-rgsa" calendar name is not supported
|
||||
features: [Temporal, Intl.Era-monthcode]
|
||||
---*/
|
||||
|
||||
const calendar = "islamic-rgsa";
|
||||
|
||||
assert.throws(RangeError, () =>
|
||||
Temporal.ZonedDateTime.from({year: 1500, month: 1, day: 1, hour: 12, minute: 34, timeZone: "UTC", calendar}),
|
||||
"fallback for calendar ID 'islamic-rgsa' only supported in Intl.DateTimeFormat constructor, not Temporal"
|
||||
);
|
||||
15
test/intl402/Temporal/ZonedDateTime/from/islamic.js
Normal file
15
test/intl402/Temporal/ZonedDateTime/from/islamic.js
Normal file
@ -0,0 +1,15 @@
|
||||
// Copyright (C) 2025 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal.zoneddatetime.prototype.from
|
||||
description: "islamic" calendar name is not supported
|
||||
features: [Temporal, Intl.Era-monthcode]
|
||||
---*/
|
||||
|
||||
const calendar = "islamic";
|
||||
|
||||
assert.throws(RangeError, () =>
|
||||
Temporal.ZonedDateTime.from({year: 1500, month: 1, day: 1, calendar}),
|
||||
"fallback for calendar ID 'islamic' only supported in Intl.DateTimeFormat constructor, not Temporal"
|
||||
);
|
||||
@ -1,12 +0,0 @@
|
||||
// Copyright (C) 2023 Justin Grant. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal-intl
|
||||
description: Islamic calendar "islamic-rgsa".
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
assert.throws(RangeError, function () {
|
||||
Temporal.PlainDate.from({ year: 1500, month: 1, day: 1, calendar: "islamic-rgsa" });
|
||||
}, "fallback for calendar ID 'islamic-rgsa' only supported in Intl.DateTimeFormat constructor, not Temporal");
|
||||
@ -1,12 +0,0 @@
|
||||
// Copyright (C) 2023 Justin Grant. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-temporal-intl
|
||||
description: Islamic calendar "islamic".
|
||||
features: [Temporal]
|
||||
---*/
|
||||
|
||||
assert.throws(RangeError, function () {
|
||||
Temporal.PlainDate.from({ year: 1500, month: 1, day: 1, calendar: "islamic" });
|
||||
}, "fallback for calendar ID 'islamic' only supported in Intl.DateTimeFormat constructor, not Temporal");
|
||||
Loading…
x
Reference in New Issue
Block a user