Debian Codegraph @

js/src/tests/test262/intl402/Intl/getCanonicalLocales/grandfathered.js

raw
1 // Copyright 2018 André Bargull; Igalia, S.L. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 // Split from intl402/Locale/likely-subtags-grandfathered.js
5 /*---
6 esid: sec-intl.getcanonicallocales
7 description: >
8 Verifies canonicalization of specific tags.
9 ---*/
10
11
12 const regularGrandfathered = [
13 {
14 tag: "art-lojban",
15 canonical: "jbo",
16 },
17 {
18 tag: "zh-guoyu",
19 canonical: "zh",
20 },
21 {
22 tag: "zh-hakka",
23 canonical: "hak",
24 },
25 {
26 tag: "zh-xiang",
27 canonical: "hsn",
28 },
29 ];
30
31 for (const {tag, canonical} of regularGrandfathered) {
32 assert.sameValue(Intl.getCanonicalLocales(tag)[0], canonical);
33 }
34
35 reportCompare(0, 0);