locales-specific.js (937B)
1 // Copyright 2018 the V8 project authors, Igalia, S.L. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 esid: sec-Intl.Segmenter.supportedLocalesOf 6 description: Checks handling of specific locales arguments to the supportedLocalesOf function. 7 info: | 8 Intl.Segmenter.supportedLocalesOf ( locales [, options ]) 9 10 3. Return ? SupportedLocales(availableLocales, requestedLocales, options). 11 includes: [compareArray.js] 12 locale: [sr, sr-Thai-RS, de, zh-CN] 13 features: [Intl.Segmenter] 14 ---*/ 15 16 assert.sameValue(typeof Intl.Segmenter.supportedLocalesOf, "function", 17 "Should support Intl.Segmenter.supportedLocalesOf."); 18 19 assert.compareArray(Intl.Segmenter.supportedLocalesOf("sr"), ["sr"]); 20 21 const multiLocale = ["sr-Thai-RS", "de", "zh-CN"]; 22 assert.compareArray(Intl.Segmenter.supportedLocalesOf(multiLocale, {localeMatcher: "lookup"}), multiLocale); 23 24 reportCompare(0, 0);