mirror of https://github.com/tc39/test262.git
Temporal: Add tests for PlainTime string disambiguation with calendar
This implements the normative change in https://github.com/tc39/proposal-temporal/pull/2287 which reached consensus at the July 2022 TC39 meeting. It adds tests that ensure that PlainTime strings which require a T designator for disambiguation, are not disambiguated by adding a calendar annotation.
This commit is contained in:
parent
d8e8529e8d
commit
409d6dc71a
|
@ -16,6 +16,14 @@ const ambiguousStrings = [
|
|||
"1130", // ditto, including DD that doesn't occur in every month
|
||||
"12-14", // ambiguity between MM-DD and HH-UU
|
||||
"202112", // ambiguity between YYYYMM and HHMMSS
|
||||
// same strings as above but with a calendar annotation, which must not cause
|
||||
// disambiguation in favour of time
|
||||
"2021-12[u-ca=iso8601]",
|
||||
"1214[u-ca=iso8601]",
|
||||
"0229[u-ca=iso8601]",
|
||||
"1130[u-ca=iso8601]",
|
||||
"12-14[u-ca=iso8601]",
|
||||
"202112[u-ca=iso8601]",
|
||||
];
|
||||
ambiguousStrings.forEach((string) => {
|
||||
let arg = string;
|
||||
|
|
|
@ -16,6 +16,14 @@ const ambiguousStrings = [
|
|||
"1130", // ditto, including DD that doesn't occur in every month
|
||||
"12-14", // ambiguity between MM-DD and HH-UU
|
||||
"202112", // ambiguity between YYYYMM and HHMMSS
|
||||
// same strings as above but with a calendar annotation, which must not cause
|
||||
// disambiguation in favour of time
|
||||
"2021-12[u-ca=iso8601]",
|
||||
"1214[u-ca=iso8601]",
|
||||
"0229[u-ca=iso8601]",
|
||||
"1130[u-ca=iso8601]",
|
||||
"12-14[u-ca=iso8601]",
|
||||
"202112[u-ca=iso8601]",
|
||||
];
|
||||
ambiguousStrings.forEach((string) => {
|
||||
let arg = string;
|
||||
|
|
|
@ -16,6 +16,14 @@ const ambiguousStrings = [
|
|||
"1130", // ditto, including DD that doesn't occur in every month
|
||||
"12-14", // ambiguity between MM-DD and HH-UU
|
||||
"202112", // ambiguity between YYYYMM and HHMMSS
|
||||
// same strings as above but with a calendar annotation, which must not cause
|
||||
// disambiguation in favour of time
|
||||
"2021-12[u-ca=iso8601]",
|
||||
"1214[u-ca=iso8601]",
|
||||
"0229[u-ca=iso8601]",
|
||||
"1130[u-ca=iso8601]",
|
||||
"12-14[u-ca=iso8601]",
|
||||
"202112[u-ca=iso8601]",
|
||||
];
|
||||
ambiguousStrings.forEach((string) => {
|
||||
let arg = string;
|
||||
|
|
|
@ -16,6 +16,14 @@ const ambiguousStrings = [
|
|||
"1130", // ditto, including DD that doesn't occur in every month
|
||||
"12-14", // ambiguity between MM-DD and HH-UU
|
||||
"202112", // ambiguity between YYYYMM and HHMMSS
|
||||
// same strings as above but with a calendar annotation, which must not cause
|
||||
// disambiguation in favour of time
|
||||
"2021-12[u-ca=iso8601]",
|
||||
"1214[u-ca=iso8601]",
|
||||
"0229[u-ca=iso8601]",
|
||||
"1130[u-ca=iso8601]",
|
||||
"12-14[u-ca=iso8601]",
|
||||
"202112[u-ca=iso8601]",
|
||||
];
|
||||
ambiguousStrings.forEach((string) => {
|
||||
let arg = string;
|
||||
|
|
|
@ -14,6 +14,14 @@ const ambiguousStrings = [
|
|||
"1130", // ditto, including DD that doesn't occur in every month
|
||||
"12-14", // ambiguity between MM-DD and HH-UU
|
||||
"202112", // ambiguity between YYYYMM and HHMMSS
|
||||
// same strings as above but with a calendar annotation, which must not cause
|
||||
// disambiguation in favour of time
|
||||
"2021-12[u-ca=iso8601]",
|
||||
"1214[u-ca=iso8601]",
|
||||
"0229[u-ca=iso8601]",
|
||||
"1130[u-ca=iso8601]",
|
||||
"12-14[u-ca=iso8601]",
|
||||
"202112[u-ca=iso8601]",
|
||||
];
|
||||
ambiguousStrings.forEach((string) => {
|
||||
let arg = string;
|
||||
|
|
|
@ -16,6 +16,14 @@ const ambiguousStrings = [
|
|||
"1130", // ditto, including DD that doesn't occur in every month
|
||||
"12-14", // ambiguity between MM-DD and HH-UU
|
||||
"202112", // ambiguity between YYYYMM and HHMMSS
|
||||
// same strings as above but with a calendar annotation, which must not cause
|
||||
// disambiguation in favour of time
|
||||
"2021-12[u-ca=iso8601]",
|
||||
"1214[u-ca=iso8601]",
|
||||
"0229[u-ca=iso8601]",
|
||||
"1130[u-ca=iso8601]",
|
||||
"12-14[u-ca=iso8601]",
|
||||
"202112[u-ca=iso8601]",
|
||||
];
|
||||
ambiguousStrings.forEach((string) => {
|
||||
let arg = string;
|
||||
|
|
|
@ -16,6 +16,14 @@ const ambiguousStrings = [
|
|||
"1130", // ditto, including DD that doesn't occur in every month
|
||||
"12-14", // ambiguity between MM-DD and HH-UU
|
||||
"202112", // ambiguity between YYYYMM and HHMMSS
|
||||
// same strings as above but with a calendar annotation, which must not cause
|
||||
// disambiguation in favour of time
|
||||
"2021-12[u-ca=iso8601]",
|
||||
"1214[u-ca=iso8601]",
|
||||
"0229[u-ca=iso8601]",
|
||||
"1130[u-ca=iso8601]",
|
||||
"12-14[u-ca=iso8601]",
|
||||
"202112[u-ca=iso8601]",
|
||||
];
|
||||
ambiguousStrings.forEach((string) => {
|
||||
let arg = string;
|
||||
|
|
|
@ -16,6 +16,14 @@ const ambiguousStrings = [
|
|||
"1130", // ditto, including DD that doesn't occur in every month
|
||||
"12-14", // ambiguity between MM-DD and HH-UU
|
||||
"202112", // ambiguity between YYYYMM and HHMMSS
|
||||
// same strings as above but with a calendar annotation, which must not cause
|
||||
// disambiguation in favour of time
|
||||
"2021-12[u-ca=iso8601]",
|
||||
"1214[u-ca=iso8601]",
|
||||
"0229[u-ca=iso8601]",
|
||||
"1130[u-ca=iso8601]",
|
||||
"12-14[u-ca=iso8601]",
|
||||
"202112[u-ca=iso8601]",
|
||||
];
|
||||
ambiguousStrings.forEach((string) => {
|
||||
let arg = string;
|
||||
|
|
|
@ -16,6 +16,14 @@ const ambiguousStrings = [
|
|||
"1130", // ditto, including DD that doesn't occur in every month
|
||||
"12-14", // ambiguity between MM-DD and HH-UU
|
||||
"202112", // ambiguity between YYYYMM and HHMMSS
|
||||
// same strings as above but with a calendar annotation, which must not cause
|
||||
// disambiguation in favour of time
|
||||
"2021-12[u-ca=iso8601]",
|
||||
"1214[u-ca=iso8601]",
|
||||
"0229[u-ca=iso8601]",
|
||||
"1130[u-ca=iso8601]",
|
||||
"12-14[u-ca=iso8601]",
|
||||
"202112[u-ca=iso8601]",
|
||||
];
|
||||
ambiguousStrings.forEach((string) => {
|
||||
let arg = string;
|
||||
|
|
Loading…
Reference in New Issue