diff options
author | Norbert Lindenberg <ecmascript@lindenbergsoftware.com> | 2012-08-26 20:50:24 -0700 |
---|---|---|
committer | Norbert Lindenberg <ecmascript@lindenbergsoftware.com> | 2012-08-26 20:50:24 -0700 |
commit | 2f88b751bd6eb49bc2ca985e89aea86deb67a1de (patch) | |
tree | 79aed459cf2d8f9d26f8e0ece825d5e20b1d4650 /test/suite/intl402/ch10/10.3/10.3.2_CS_c_NN.js | |
parent | 02764dfe42d9b70f574fcad9db5210a0336d6d8f (diff) | |
download | test262-2f88b751bd6eb49bc2ca985e89aea86deb67a1de.tar.gz |
Added new tests for chapters 10 to 13 of the ECMAScript Internationalization API Specification.
--HG--
rename : test/suite/intl402/ch10/10.3/10.3.js => test/suite/intl402/ch10/10.3/10.3_a.js
rename : test/suite/intl402/ch11/11.3/11.3.js => test/suite/intl402/ch11/11.3/11.3_a.js
rename : test/suite/intl402/ch12/12.3/12.3.js => test/suite/intl402/ch12/12.3/12.3_a.js
Diffstat (limited to 'test/suite/intl402/ch10/10.3/10.3.2_CS_c_NN.js')
-rw-r--r-- | test/suite/intl402/ch10/10.3/10.3.2_CS_c_NN.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/suite/intl402/ch10/10.3/10.3.2_CS_c_NN.js b/test/suite/intl402/ch10/10.3/10.3.2_CS_c_NN.js new file mode 100644 index 000000000..5d5060be5 --- /dev/null +++ b/test/suite/intl402/ch10/10.3/10.3.2_CS_c_NN.js @@ -0,0 +1,22 @@ +// Copyright 2011-2012 Norbert Lindenberg. All rights reserved. +// Copyright 2012 Mozilla Corporation. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @description Tests that the compare function supports phonebook sorting if it says it does. + * This test is not normative. + * @author Norbert Lindenberg + */ + +$INCLUDE("testIntl.js"); + +// this test should be valid at least for the following locales +var locales = ["de-DE-u-co-phonebk", "de-u-co-phonebk"]; +var collator = new Intl.Collator(locales, {localeMatcher: "lookup"}); +if (locales.indexOf(collator.resolvedOptions().locale) !== -1) { + var a = ["A", "b", "Af", "Ab", "od", "off", "Ä", "ö"]; + a.sort(collator.compare); + var expected = ["A", "Ab", "Ä", "Af", "b", "od", "ö", "off"]; + testArraysAreSame(expected, a); +} + |