tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

locales-specific.js (957B)


      1 // Copyright 2022 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.DurationFormat.supportedLocalesOf
      6 description: Checks handling of specific locales arguments to the supportedLocalesOf function.
      7 info: |
      8    Intl.DurationFormat.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.DurationFormat]
     14 ---*/
     15 
     16 assert.sameValue(typeof Intl.DurationFormat.supportedLocalesOf, "function",
     17                 "Should support Intl.DurationFormat.supportedLocalesOf.");
     18 
     19 assert.compareArray(Intl.DurationFormat.supportedLocalesOf("sr"), ["sr"]);
     20 
     21 const multiLocale = ["sr-Thai-RS", "de", "zh-CN"];
     22 assert.compareArray(Intl.DurationFormat.supportedLocalesOf(multiLocale, {localeMatcher: "lookup"}), multiLocale);
     23 
     24 reportCompare(0, 0);