test262/test/intl402/Segmenter/constructor
Frank Yung-Fong Tang 9997a26c7d
Fix tests on {localeMatcher: "lookup"} (#3008)
* Fix test for only {localeMatcher: "lookup"}

The expectation that "sr-Thai-RS" would be returned is only true with the 
9.2.2 BestAvailableLocale ( availableLocales, locale )
https://tc39.es/ecma402/#sec-bestavailablelocale
algorithm used by 9.2.3 LookupMatcher ( availableLocales, requestedLocales )
https://tc39.es/ecma402/#sec-lookupmatcher

The default for localeMatcher is "best fit" but not "lookup" for all Intl objects.

And for 9.2.4 BestFitMatcher ( availableLocales, requestedLocales )
https://tc39.es/ecma402/#sec-bestfitmatcher
It may not match "sr-Thai-RS" for "sr"  and return ["de", "zh-CN"] instead. Therefore, we need to change this test to only test on {localeMatcher: "lookup"}

* Add option to getLocaleSupportInfo

Needed to test different localeMatcher

* only test for "lookup" localeMatcher

* Get the info based on the localeMatcher

* pass in localeMatcher to getLocaleSupportInfo
2021-06-24 13:37:33 -04:00
..
constructor Change Intl.(ListFormat|DisplayNames|Segmenter) (#2952) 2021-03-08 19:31:26 -08:00
supportedLocalesOf Fix tests on {localeMatcher: "lookup"} (#3008) 2021-06-24 13:37:33 -04:00
length.js Intl.Segmenter: Some initial tests. (#1844) 2018-10-15 11:29:25 -04:00
name.js Intl.Segmenter: Some initial tests. (#1844) 2018-10-15 11:29:25 -04:00
prop-desc.js Intl.Segmenter: Some initial tests. (#1844) 2018-10-15 11:29:25 -04:00
prototype.js Intl.Segmenter: Some initial tests. (#1844) 2018-10-15 11:29:25 -04:00