diff --git a/test/intl402/RelativeTimeFormat/prototype/formatToParts/en-us-numeric-always.js b/test/intl402/RelativeTimeFormat/prototype/formatToParts/en-us-numeric-always.js index 5cc5b1d8ab9811308dcda0e5eeb4047a247a59ae..5b6252ed2b6226958f4ca6fedb2e22c60e7ea16c 100644 --- a/test/intl402/RelativeTimeFormat/prototype/formatToParts/en-us-numeric-always.js +++ b/test/intl402/RelativeTimeFormat/prototype/formatToParts/en-us-numeric-always.js @@ -36,7 +36,9 @@ assert.sameValue(typeof rtf.formatToParts, "function", "formatToParts should be for (const unit of units) { verifyFormatParts(rtf.formatToParts(1000, unit), [ { "type": "literal", "value": "in " }, - { "type": "integer", "value": "1,000", "unit": unit }, + { "type": "integer", "value": "1", "unit": unit }, + { "type": "group", "value": ",", "unit": unit }, + { "type": "integer", "value": "000", "unit": unit }, { "type": "literal", "value": ` ${unit}s` }, ], `formatToParts(1000, ${unit})`); @@ -85,7 +87,19 @@ for (const unit of units) { ], `formatToParts(-10, ${unit})`); verifyFormatParts(rtf.formatToParts(-1000, unit), [ - { "type": "integer", "value": "1,000", "unit": unit }, + { "type": "integer", "value": "1", "unit": unit }, + { "type": "group", "value": ",", "unit": unit }, + { "type": "integer", "value": "000", "unit": unit }, { "type": "literal", "value": ` ${unit}s ago` }, ], `formatToParts(-1000, ${unit})`); + + verifyFormatParts(rtf.formatToParts(123456.78, unit), [ + { "type": "literal", "value": "in " }, + { "type": "integer", "value": "123", "unit": unit }, + { "type": "group", "value": ",", "unit": unit }, + { "type": "integer", "value": "456", "unit": unit }, + { "type": "decimal", "value": ".", "unit": unit }, + { "type": "fraction", "value": "78", "unit": unit }, + { "type": "literal", "value": ` ${unit}s` }, + ], `formatToParts(123456.78, ${unit})`); } diff --git a/test/intl402/RelativeTimeFormat/prototype/formatToParts/en-us-numeric-auto.js b/test/intl402/RelativeTimeFormat/prototype/formatToParts/en-us-numeric-auto.js index a7f39ae821e9d417d8e8e0a31efaedcce7e39f1d..00f319bb8631e3981ad2a3cd89e38ed163f4ae53 100644 --- a/test/intl402/RelativeTimeFormat/prototype/formatToParts/en-us-numeric-auto.js +++ b/test/intl402/RelativeTimeFormat/prototype/formatToParts/en-us-numeric-auto.js @@ -79,7 +79,9 @@ assert.sameValue(typeof rtf.formatToParts, "function", "formatToParts should be for (const unit of units) { verifyFormatParts(rtf.formatToParts(1000, unit), [ { "type": "literal", "value": "in " }, - { "type": "integer", "value": "1,000", "unit": unit }, + { "type": "integer", "value": "1", "unit": unit }, + { "type": "group", "value": ",", "unit": unit }, + { "type": "integer", "value": "000", "unit": unit }, { "type": "literal", "value": ` ${unit}s` }, ], `formatToParts(1000, ${unit})`); @@ -128,7 +130,19 @@ for (const unit of units) { ], `formatToParts(-10, ${unit})`); verifyFormatParts(rtf.formatToParts(-1000, unit), [ - { "type": "integer", "value": "1,000", "unit": unit }, + { "type": "integer", "value": "1", "unit": unit }, + { "type": "group", "value": ",", "unit": unit }, + { "type": "integer", "value": "000", "unit": unit }, { "type": "literal", "value": ` ${unit}s ago` }, ], `formatToParts(-1000, ${unit})`); + + verifyFormatParts(rtf.formatToParts(123456.78, unit), [ + { "type": "literal", "value": "in " }, + { "type": "integer", "value": "123", "unit": unit }, + { "type": "group", "value": ",", "unit": unit }, + { "type": "integer", "value": "456", "unit": unit }, + { "type": "decimal", "value": ".", "unit": unit }, + { "type": "fraction", "value": "78", "unit": unit }, + { "type": "literal", "value": ` ${unit}s` }, + ], `formatToParts(123456.78, ${unit})`); } diff --git a/test/intl402/RelativeTimeFormat/prototype/formatToParts/en-us-style-short.js b/test/intl402/RelativeTimeFormat/prototype/formatToParts/en-us-style-short.js index 2ff39cf60864f1f3089eb7a8b8297a14a5ce4f2b..2e9fedf1869929a6590815058bcc113e21872df4 100644 --- a/test/intl402/RelativeTimeFormat/prototype/formatToParts/en-us-style-short.js +++ b/test/intl402/RelativeTimeFormat/prototype/formatToParts/en-us-style-short.js @@ -40,7 +40,9 @@ for (const [unitArgument, unitStrings] of Object.entries(units)) { verifyFormatParts(rtf.formatToParts(1000, unitArgument), [ { "type": "literal", "value": "in " }, - { "type": "integer", "value": "1,000", "unit": unitArgument }, + { "type": "integer", "value": "1", "unit": unitArgument }, + { "type": "group", "value": ",", "unit": unitArgument }, + { "type": "integer", "value": "000", "unit": unitArgument }, { "type": "literal", "value": ` ${plural}` }, ], `formatToParts(1000, ${unitArgument})`); @@ -89,7 +91,19 @@ for (const [unitArgument, unitStrings] of Object.entries(units)) { ], `formatToParts(-10, ${unitArgument})`); verifyFormatParts(rtf.formatToParts(-1000, unitArgument), [ - { "type": "integer", "value": "1,000", "unit": unitArgument }, + { "type": "integer", "value": "1", "unit": unitArgument }, + { "type": "group", "value": ",", "unit": unitArgument }, + { "type": "integer", "value": "000", "unit": unitArgument }, { "type": "literal", "value": ` ${plural} ago` }, ], `formatToParts(-1000, ${unitArgument})`); + + verifyFormatParts(rtf.formatToParts(123456.78, unitArgument), [ + { "type": "literal", "value": "in " }, + { "type": "integer", "value": "123", "unit": unitArgument }, + { "type": "group", "value": ",", "unit": unitArgument }, + { "type": "integer", "value": "456", "unit": unitArgument }, + { "type": "decimal", "value": ".", "unit": unitArgument }, + { "type": "fraction", "value": "78", "unit": unitArgument }, + { "type": "literal", "value": ` ${plural}` }, + ], `formatToParts(123456.78, ${unitArgument})`); } diff --git a/test/intl402/RelativeTimeFormat/prototype/formatToParts/pl-pl-style-long.js b/test/intl402/RelativeTimeFormat/prototype/formatToParts/pl-pl-style-long.js index 49d43f7482baa1d5d26cef62e55a2927436c32ce..fb8d53934410a2a85fe959ad526ee09d9e17fc8a 100644 --- a/test/intl402/RelativeTimeFormat/prototype/formatToParts/pl-pl-style-long.js +++ b/test/intl402/RelativeTimeFormat/prototype/formatToParts/pl-pl-style-long.js @@ -23,6 +23,7 @@ function regular(s) { "many": s, "few": s + "y", "one": s + "ę", + "other": s + "y", } } @@ -35,27 +36,32 @@ const units = { "many": "dni", "few": "dni", "one": "dzień", + "other": "dnia", }, "week": { "many": "tygodni", "few": "tygodnie", "one": "tydzień", + "other": "tygodnia", }, "month": { 1000: "miesięcy", "many": "miesięcy", "few": "miesiące", "one": "miesiąc", + "other": "miesiąca", }, "quarter": { "many": "kwartałów", "few": "kwartały", "one": "kwartał", + "other": "kwartału", }, "year": { "many": "lat", "few": "lata", "one": "rok", + "other": "roku", }, }; @@ -68,7 +74,9 @@ assert.sameValue(typeof rtf.formatToParts, "function", "formatToParts should be for (const [unitArgument, expected] of Object.entries(units)) { verifyFormatParts(rtf.formatToParts(1000, unitArgument), [ { "type": "literal", "value": "za " }, - { "type": "integer", "value": "1\u00a0000", "unit": unitArgument }, + { "type": "integer", "value": "1", "unit": unitArgument }, + { "type": "group", "value": "\u00a0", "unit": unitArgument }, + { "type": "integer", "value": "000", "unit": unitArgument }, { "type": "literal", "value": ` ${expected.many}` }, ], `formatToParts(1000, ${unitArgument})`); @@ -117,7 +125,19 @@ for (const [unitArgument, expected] of Object.entries(units)) { ], `formatToParts(-10, ${unitArgument})`); verifyFormatParts(rtf.formatToParts(-1000, unitArgument), [ - { "type": "integer", "value": "1\u00a0000", "unit": unitArgument }, + { "type": "integer", "value": "1", "unit": unitArgument }, + { "type": "group", "value": "\u00a0", "unit": unitArgument }, + { "type": "integer", "value": "000", "unit": unitArgument }, { "type": "literal", "value": ` ${expected.many} temu` }, ], `formatToParts(-1000, ${unitArgument})`); + + verifyFormatParts(rtf.formatToParts(123456.78, unitArgument), [ + { "type": "literal", "value": "za " }, + { "type": "integer", "value": "123", "unit": unitArgument }, + { "type": "group", "value": "\u00a0", "unit": unitArgument }, + { "type": "integer", "value": "456", "unit": unitArgument }, + { "type": "decimal", "value": ",", "unit": unitArgument }, + { "type": "fraction", "value": "78", "unit": unitArgument }, + { "type": "literal", "value": ` ${expected.other}` }, + ], `formatToParts(123456.78, ${unitArgument})`); } diff --git a/test/intl402/RelativeTimeFormat/prototype/formatToParts/pl-pl-style-narrow.js b/test/intl402/RelativeTimeFormat/prototype/formatToParts/pl-pl-style-narrow.js index 263a36450f02fc2d4d4943fa1406e161c34ab506..c2a2c0ee592927b2468f118182c1cc7502eb8799 100644 --- a/test/intl402/RelativeTimeFormat/prototype/formatToParts/pl-pl-style-narrow.js +++ b/test/intl402/RelativeTimeFormat/prototype/formatToParts/pl-pl-style-narrow.js @@ -23,6 +23,7 @@ function always(s) { "many": s, "few": s, "one": s, + "other": s, } } @@ -35,11 +36,13 @@ const units = { "many": "dni", "few": "dni", "one": "dzień", + "other": "dnia", }, "week": { "many": "tyg.", "few": "tyg.", "one": "tydz.", + "other": "tyg.", }, "month": always("mies."), "quarter": always("kw."), @@ -47,6 +50,7 @@ const units = { "many": "lat", "few": "lata", "one": "rok", + "other": "roku", }, }; @@ -59,7 +63,9 @@ assert.sameValue(typeof rtf.formatToParts, "function", "formatToParts should be for (const [unitArgument, expected] of Object.entries(units)) { verifyFormatParts(rtf.formatToParts(1000, unitArgument), [ { "type": "literal", "value": "za " }, - { "type": "integer", "value": "1\u00a0000", "unit": unitArgument }, + { "type": "integer", "value": "1", "unit": unitArgument }, + { "type": "group", "value": "\u00a0", "unit": unitArgument }, + { "type": "integer", "value": "000", "unit": unitArgument }, { "type": "literal", "value": ` ${expected.many}` }, ], `formatToParts(1000, ${unitArgument})`); @@ -108,7 +114,19 @@ for (const [unitArgument, expected] of Object.entries(units)) { ], `formatToParts(-10, ${unitArgument})`); verifyFormatParts(rtf.formatToParts(-1000, unitArgument), [ - { "type": "integer", "value": "1\u00a0000", "unit": unitArgument }, + { "type": "integer", "value": "1", "unit": unitArgument }, + { "type": "group", "value": "\u00a0", "unit": unitArgument }, + { "type": "integer", "value": "000", "unit": unitArgument }, { "type": "literal", "value": ` ${expected.many} temu` }, ], `formatToParts(-1000, ${unitArgument})`); + + verifyFormatParts(rtf.formatToParts(123456.78, unitArgument), [ + { "type": "literal", "value": "za " }, + { "type": "integer", "value": "123", "unit": unitArgument }, + { "type": "group", "value": "\u00a0", "unit": unitArgument }, + { "type": "integer", "value": "456", "unit": unitArgument }, + { "type": "decimal", "value": ",", "unit": unitArgument }, + { "type": "fraction", "value": "78", "unit": unitArgument }, + { "type": "literal", "value": ` ${expected.other}` }, + ], `formatToParts(123456.78, ${unitArgument})`); } diff --git a/test/intl402/RelativeTimeFormat/prototype/formatToParts/pl-pl-style-short.js b/test/intl402/RelativeTimeFormat/prototype/formatToParts/pl-pl-style-short.js index cdf74d3106e1465788e599896a592ba3bec7ea5d..c105d91793a4e06a20bbf921ba2d0a202c8eaa51 100644 --- a/test/intl402/RelativeTimeFormat/prototype/formatToParts/pl-pl-style-short.js +++ b/test/intl402/RelativeTimeFormat/prototype/formatToParts/pl-pl-style-short.js @@ -23,6 +23,7 @@ function always(s) { "many": s, "few": s, "one": s, + "other": s, } } @@ -35,11 +36,13 @@ const units = { "many": "dni", "few": "dni", "one": "dzień", + "other": "dnia", }, "week": { "many": "tyg.", "few": "tyg.", "one": "tydz.", + "other": "tyg.", }, "month": always("mies."), "quarter": always("kw."), @@ -47,6 +50,7 @@ const units = { "many": "lat", "few": "lata", "one": "rok", + "other": "roku", }, }; @@ -59,7 +63,9 @@ assert.sameValue(typeof rtf.formatToParts, "function", "formatToParts should be for (const [unitArgument, expected] of Object.entries(units)) { verifyFormatParts(rtf.formatToParts(1000, unitArgument), [ { "type": "literal", "value": "za " }, - { "type": "integer", "value": "1\u00a0000", "unit": unitArgument }, + { "type": "integer", "value": "1", "unit": unitArgument }, + { "type": "group", "value": "\u00a0", "unit": unitArgument }, + { "type": "integer", "value": "000", "unit": unitArgument }, { "type": "literal", "value": ` ${expected.many}` }, ], `formatToParts(1000, ${unitArgument})`); @@ -108,7 +114,19 @@ for (const [unitArgument, expected] of Object.entries(units)) { ], `formatToParts(-10, ${unitArgument})`); verifyFormatParts(rtf.formatToParts(-1000, unitArgument), [ - { "type": "integer", "value": "1\u00a0000", "unit": unitArgument }, + { "type": "integer", "value": "1", "unit": unitArgument }, + { "type": "group", "value": "\u00a0", "unit": unitArgument }, + { "type": "integer", "value": "000", "unit": unitArgument }, { "type": "literal", "value": ` ${expected.many} temu` }, ], `formatToParts(-1000, ${unitArgument})`); + + verifyFormatParts(rtf.formatToParts(123456.78, unitArgument), [ + { "type": "literal", "value": "za " }, + { "type": "integer", "value": "123", "unit": unitArgument }, + { "type": "group", "value": "\u00a0", "unit": unitArgument }, + { "type": "integer", "value": "456", "unit": unitArgument }, + { "type": "decimal", "value": ",", "unit": unitArgument }, + { "type": "fraction", "value": "78", "unit": unitArgument }, + { "type": "literal", "value": ` ${expected.other}` }, + ], `formatToParts(123456.78, ${unitArgument})`); }