Commit Graph

74 Commits

Author SHA1 Message Date
Frank Yung-Fong Tang 753d502e9a Update the expctation of constructor-options-firstDayOfWeek-valid.js
true will be dropped inside UTS35
2024-07-11 15:24:54 -07:00
Frank Tang 7b154389ce Update firstDay test to latest spec after PR 79
Spec Changes merged
https://github.com/tc39/proposal-intl-locale-info/pull/79
2024-07-10 11:20:28 -07:00
Kevin Gibbons 961480ac61 remove some auto-generated error messages in "assert.throws" tests 2024-03-25 12:09:10 +01:00
Frank Yung-Fong Tang a2597599bc Add test for ECMA402 PR846
the calenar name should be canonicalized
Spec change https://github.com/tc39/ecma402/pull/846
2024-02-23 15:53:00 -08:00
Frank Tang 96727cae1c Add test for firstDayOfWeek in LocaleInfo PR 70
Test for enhancement in
https://github.com/tc39/proposal-intl-locale-info/pull/70
2023-11-10 18:11:03 -08:00
André Bargull 873f260478 Update likely subtags tests for CLDR 44 2023-11-08 13:48:33 +01:00
Frank Tang bba19d51ae Sync Intl Locale API tests w/ PR67
https://github.com/tc39/proposal-intl-locale-info/pull/67
2023-09-13 16:01:07 +02:00
André Bargull f4e31fc397 Update expected test results for CLDR 43
intl402/Locale/constructor-non-iana-canon.js
- Likely subtags entry for "hyw" -> "hyw-Armn-AM" was added to supplemental/likelySubtags.xml

intl402/Locale/prototype/minimize/removing-likely-subtags-first-adds-likely-subtags.js
- Likely subtags entry for "aae" -> "aae-Latn-IT" was added to supplemental/likelySubtags.xml
- Likely subtags entry for "pap" was changed from "pap_Latn_AW" to "pap_Latn_CW"
2023-05-31 09:26:12 -07:00
José Julián Espina 4a6439e4a7
Add `Array.prototype.includes` and `exponentiation` features (#3799) 2023-03-23 10:51:08 +01:00
Yusuke Suzuki fc6a9169a4 Update Intl.Locale info API test
weekendStart / weekendEnd are merged into one weekend array.
2021-11-30 14:36:01 -05:00
Mike Pennisi 347b651e95 Improve coverage for Intl Locale Info proposal 2021-07-21 13:43:57 -04:00
Ujjwal Sharma 26cf753e74
intl402: add output tests for locale-info (#3007)
* intl402: locale-info tests for array output

* fixup! intl402: locale-info tests for array output

* fixup! intl402: locale-info tests for array output
2021-06-24 13:20:47 -04:00
Ujjwal Sharma 5e0fc43c66
Add basic tests for proposal-intl-locale-info (#2987)
* Add basic tests for weekInfo

* Add basic tests for textInfo

* Add basic tests for timeZones

* Add basic tests for numberingSystems

* Add basic tests for hourCycles

* Add basic tests for collations

* Add basic tests for calendars

* Add feature for Intl.Locale-info

* add validation to branding tests for locale-info

Add additional assertion to branding tests for proposal-intl-locale-info
to make sure they don't pass spuriously when the proposal is not
implemented.
2021-05-18 22:40:08 -04:00
Frank Yung-Fong Tang b2e9dff281 change cel-gaulish map to xtg 2020-12-21 10:15:14 -05:00
Frank Yung-Fong Tang 7c9480476e Update the test based on v35 of UTS35
see http://unicode.org/reports/tr35/#LocaleId_Canonicalization
@anba
2020-12-21 10:15:14 -05:00
Frank Yung-Fong Tang 483219a596 fix mapping for cel-gaulish 2020-12-16 11:59:06 -05:00
Jeff Walden 2cfccb765a Add tests verifying that duplicate variants, in a tag or in the tlang component of a tag, make it structurally invalid. 2020-10-09 16:34:33 -04:00
Frank Yung-Fong Tang 850c65317f Revert "Correct the expectation of zh-Hant"
This reverts commit e8dfe549a8.
2020-04-29 17:22:28 -04:00
Frank Yung-Fong Tang e8dfe549a8 Correct the expectation of zh-Hant
It is incorrect to expect the minimize result of "zh-Hant" to be "zh-TW". It should be "zh-Hant". Why?

first, what we have in input for zh-Hant
lang = zh
region = [none]
script = Hant 

Now, look at the AddLikelySubtags algorithm in http://www.unicode.org/reports/tr35/#Likely_Subtags
2020-04-25 18:52:46 -04:00
Jeff Walden 31dabb5618 Add a test for Unicode key-type pairs being canonicalized by Intl.Locale regardless whether they're passed in the input tag, or through the options object. 2020-04-23 10:49:48 -04:00
André Bargull 18bb955771 Upstream additional language tag canonicalisation and Intl.Locale tests from SpiderMonkey
Adds more canonicalisation and Intl.Locale tests from:
- https://hg.mozilla.org/mozilla-central/file/tip/js/src/tests/non262/Intl/Locale
- https://hg.mozilla.org/mozilla-central/file/tip/js/src/tests/non262/Intl/
2020-04-09 09:20:55 -04:00
André Bargull 5d8e6c8e85 Restore grandfathered tests removed in #2054
With the move to UTS 35 for language tag processing, the expected
canonicalisation results for "cel-gaulish" should now be consistent across
implementations.
2020-04-09 09:20:55 -04:00
André Bargull de02cf4dd5 Re-enable variant subtag canonicalisation in tests
UTS 35 canonicalisation requires to (again) canonicalise variant subtags.
2020-04-09 09:20:55 -04:00
Alexey Shvayka 34cbf0aed2 Add "proto-from-ctor-realm" tests for Intl proposals (#2346)
* Add Intl.Segmenter test

* Add Intl.RelativeTimeFormat test

* Add Intl.Locale test

* Add Intl.ListFormat test
2019-10-08 14:39:52 -04:00
André Bargull 99f75984db Fix expected test values (#2261)
These two slipped through the cracks in #2097:

test/intl402/Intl/getCanonicalLocales/non-iana-canon.js
- Variant subtag canonicalisation is currrently not allowed.

test/intl402/Locale/getters.js
- Only the first "loc.caseFirst" test in this file was updated in #2097.
2019-07-30 10:53:44 -04:00
André Bargull 50331bd641 Correct expected value for Intl.Locale 'caseFirst'
An empty string is expected with the current proposal text.
2019-07-22 02:24:48 -07:00
André Bargull 589ef945fa Sort variants added to grandfathered tag
And add an explanation for a previously removed and now re-added assertion.
2019-07-22 02:12:21 -07:00
André Bargull e2ad1357c7 Update Intl.Locale tests for UTS 35
constructor-non-iana-canon.js
- Variant subtag canonicalisation is currently no longer present.

constructor-options-region-valid.js
- Digit region codes are now canonicalised.

constructor-tag.js
- Variant subtags are now sorted alphabetically.

likely-subtags-grandfathered.js
- "cmn" is now canonicalised to "zh".
2019-07-22 02:12:17 -07:00
Frank Yung-Fong Tang 565d7d5b7d Remove unreasonable expectation 2019-02-14 15:23:30 -05:00
Frank Yung-Fong Tang 642929b2a3 correct value that matches languageAlias in
Per  https://tc39.github.io/ecma402/#sec-canonicalizelanguagetag
6.2.3 CanonicalizeLanguageTag ( locale )
The CanonicalizeLanguageTag abstract operation returns the canonical and case-regularized form of the locale argument (which must be a String value that is a structurally valid Unicode BCP 47 Locale Identifier as verified by the IsStructurallyValidLanguageTag abstract operation). A conforming implementation shall take the steps specified in the “BCP 47 Language Tag to Unicode BCP 47 Locale Identifier” algorithm, from Unicode Technical Standard #35 LDML § 3.3.1 BCP 47 Language Tag Conversion.

And
http://unicode.org/reports/tr35/#BCP_47_Language_Tag_Conversion
"
2. If the BCP 47 primary language subtag matches the type attribute of a languageAlias element in Supplemental Data, replace the language subtag with the replacement value.
If there are additional subtags in the replacement value, add them to the result, but only if there is no corresponding subtag already in the tag.
"
and
https://www.unicode.org/repos/cldr/trunk/common/supplemental/supplementalMetadata.xml
...
<languageAlias type="aar" replacement="aa" reason="overlong"/>
 <!--  [Afar]  -->
...
<languageAlias type="ces" replacement="cs" reason="overlong"/>
 <!--  [Czech]  -->
...
<languageAlias type="heb" replacement="he" reason="overlong"/>
 <!--  [Hebrew]  -->
2019-02-14 15:07:54 -05:00
Frank Yung-Fong Tang b30d3013dc Remove getCanonicalLocales 2019-02-14 15:07:31 -05:00
Frank Yung-Fong Tang 8f713575e9 Move testing of getCanonicalLocales out of Locale
Remove all the assertion of result of getCanonicalLocales from Locale directory
and put them under Intl/getCanonicalLocales directory.
2019-02-14 15:07:31 -05:00
Ross Kirsling a066af90ea Remove errant tab character. (#2058) 2019-02-04 12:03:46 -07:00
Frank Yung-Fong Tang cc9c773c28 rm deprecated grandfather 'cel-gaulish' 2019-01-30 10:08:13 -05:00
Frank Yung-Fong Tang b94ef8cbdc rm deprecated grandfather 'cel-gaulish' 2019-01-30 10:08:13 -05:00
Frank Yung-Fong Tang 49c184eb0f Rm deprecated grandfather 'cel-gaulish' from tests 2019-01-30 10:08:13 -05:00
Frank Yung-Fong Tang dde5d8e546 Fix invalidLanguageTags array 2019-01-30 10:05:07 -05:00
Frank Yung-Fong Tang 9345023d5f move more cases from valid to invalid (#2047)
This is based on UTS35 in the new spec.
2019-01-28 11:55:57 -05:00
Frank Yung-Fong Tang 9495886d18 Change expectation for x- private lang tag (#2046) 2019-01-28 11:55:20 -05:00
Frank Yung-Fong Tang b7c9c6c78b Remove unsupported irregular grandfathered tags. (#2029) 2019-01-24 12:34:03 -05:00
Frank Yung-Fong Tang f39faeef87 Add test for 2.1 CanonicalizeLocaleList ( locales ) (#2040)
See https://tc39.github.io/proposal-intl-locale/#sec-canonicalizelocalelist
2019-01-24 12:28:25 -05:00
Frank Yung-Fong Tang 00d280d231 Remove test of extlang and 4 letter language (#2030)
This is due to the fact we now only accept Unicode Locale Identifier in
UTS 35.
2019-01-24 12:23:30 -05:00
Leo Balter 46c557247e Fix more false positives throwing TypeError in functions 2018-12-17 16:45:56 -05:00
Rick Waldron 3b09d0e2b5 Eliminate false positives: Intl.* 2018-11-30 11:47:57 -05:00
André Bargull faed4fb089 Fix various test issues 2018-10-17 07:45:33 -07:00
Adrian Heine né Lang 2234f0fc40 Fix syntax in test (#1841)
This was introduced in 6581e84949.
2018-10-09 11:29:32 -04:00
Frank Tang 0866789361 numeric should be a boolean not a string 2018-10-05 18:43:50 -07:00
Rick Waldron 6581e84949 Intl.Locale: constructor-options-*.js fixups (#1798) 2018-10-03 10:24:38 -04:00
Frank Tang 5de1831c48 Remove "ar-ma-u-ca-islamicc" test 2018-10-02 14:50:45 -04:00
Rick Waldron 37190a1deb Intl.Locale.prototype.numeric: the feature is not optional, therefore the tests are not optional 2018-09-26 11:06:03 -04:00