// |reftest| skip-if(xulRuntime.shell&&getICUOptions().system)
// -- test in browser or when not using system ICU

// Generated by make_intl_data.py. DO NOT EDIT.

// https://searchfox.org/firefox-main/source/browser/locales/all-locales
const allLocales = [
  "ach",
  "af",
  "an",
  "ar",
  "ast",
  "az",
  "be",
  "bg",
  "bn",
  "bo",
  "bqi",
  "br",
  "brx",
  "bs",
  "ca",
  "ca-valencia",
  "cak",
  "ckb",
  "cs",
  "cy",
  "da",
  "de",
  "dsb",
  "el",
  "en-CA",
  "en-GB",
  "eo",
  "es-AR",
  "es-CL",
  "es-ES",
  "es-MX",
  "et",
  "eu",
  "fa",
  "ff",
  "fi",
  "fr",
  "fur",
  "fy-NL",
  "ga-IE",
  "gd",
  "gl",
  "gn",
  "gu-IN",
  "he",
  "hi-IN",
  "hr",
  "hsb",
  "hu",
  "hy-AM",
  "hye",
  "ia",
  "id",
  "is",
  "it",
  "ja",
  "ja-JP-macos",
  "ka",
  "kab",
  "kk",
  "km",
  "kn",
  "ko",
  "lij",
  "lo",
  "lt",
  "ltg",
  "lv",
  "meh",
  "mk",
  "ml",
  "mr",
  "ms",
  "my",
  "nb-NO",
  "ne-NP",
  "nl",
  "nn-NO",
  "oc",
  "pa-IN",
  "pl",
  "pt-BR",
  "pt-PT",
  "rm",
  "ro",
  "ru",
  "sat",
  "sc",
  "scn",
  "sco",
  "si",
  "sk",
  "skr",
  "sl",
  "son",
  "sq",
  "sr",
  "sv-SE",
  "szl",
  "ta",
  "te",
  "tg",
  "th",
  "tl",
  "tr",
  "trs",
  "uk",
  "ur",
  "uz",
  "vi",
  "wo",
  "xh",
  "zh-CN",
  "zh-TW",
];

// Firefox locales which don't have (confirmed) CLDR data.
const unsupported = [
  "ach",  // Acoli
  "an",   // Aragonese
  "ast",  // Asturian
  "bqi",  // Bakhtiari
  "brx",  // Bodo (India)
  "cak",  // Cakchiquel; Kaqchikel
  "ckb",  // Central Kurdish
  "eu",   // Basque
  "fur",  // Friulian
  "gd",   // Gaelic; Scottish Gaelic
  "gn",   // Guarani
  "hye",  // Armenian (Eastern)
  "ia",   // Interlingua
  "kab",  // Kabyle
  "ltg",  // Latgalian
  "meh",  // Southwestern Tlaxiaco Mixtec
  "oc",   // Occitan
  "rm",   // Romansh
  "sat",  // Santali
  "sc",   // Sardinian
  "scn",  // Sicilian
  "sco",  // Scots
  "skr",  // Saraiki; Seraiki
  "son",  // Songhai languages
  "szl",  // Silesian
  "tg",   // Tajik
  "tl",   // Tagalog
  "trs",  // Chicahuaxtla Triqui
];

assertEq(
  new Set(allLocales).isSupersetOf(new Set(unsupported)),
  true,
  "|allLocales| contains all locales of |unsupported|"
);


const supported = Intl.Collator.supportedLocalesOf(allLocales);

// Ensure all Firefox locales are supported by Intl.Collator, except
// for the known unsupported locales.
assertEqArray(
  [...new Set(allLocales).difference(new Set(supported))].sort(),
  unsupported
);

if (typeof reportCompare === "function")
  reportCompare(0, 0, "ok");
