blob: 67a1239d62006d693b7dd5aeb850c9ba944f413e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// Copyright (C) 2017 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-intl.getcanonicallocales
description: >
Language tags are not reordered.
info: |
8.2.1 Intl.getCanonicalLocales (locales)
1. Let ll be ? CanonicalizeLocaleList(locales).
2. Return CreateArrayFromList(ll).
9.2.1 CanonicalizeLocaleList (locales)
...
7. Repeat, while k < len
...
c. If kPresent is true, then
...
vi. If canonicalizedTag is not an element of seen, append canonicalizedTag as the last element of seen.
...
---*/
var canonicalLocales = Intl.getCanonicalLocales(["zu", "af"]);
assert.sameValue(canonicalLocales.length, 2);
assert.sameValue(canonicalLocales[0], "zu");
assert.sameValue(canonicalLocales[1], "af");
reportCompare(0, 0);
|