diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /js/src/tests/test262/intl402/ch09/9.1 | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'js/src/tests/test262/intl402/ch09/9.1')
-rw-r--r-- | js/src/tests/test262/intl402/ch09/9.1/9.1_a.js | 18 | ||||
-rw-r--r-- | js/src/tests/test262/intl402/ch09/9.1/9.1_b.js | 32 | ||||
-rw-r--r-- | js/src/tests/test262/intl402/ch09/9.1/browser.js | 0 | ||||
-rw-r--r-- | js/src/tests/test262/intl402/ch09/9.1/shell.js | 0 |
4 files changed, 50 insertions, 0 deletions
diff --git a/js/src/tests/test262/intl402/ch09/9.1/9.1_a.js b/js/src/tests/test262/intl402/ch09/9.1/9.1_a.js new file mode 100644 index 000000000..b7358304b --- /dev/null +++ b/js/src/tests/test262/intl402/ch09/9.1/9.1_a.js @@ -0,0 +1,18 @@ +// Copyright 2012 Mozilla Corporation. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @description Tests that default locale is available. + * @author Norbert Lindenberg + */ + +$INCLUDE("testIntl.js"); + +testWithIntlConstructors(function (Constructor) { + var defaultLocale = new Constructor().resolvedOptions().locale; + var supportedLocales = Constructor.supportedLocalesOf([defaultLocale]); + if (supportedLocales.indexOf(defaultLocale) === -1) { + $ERROR("Default locale is not reported as available."); + } +}); + diff --git a/js/src/tests/test262/intl402/ch09/9.1/9.1_b.js b/js/src/tests/test262/intl402/ch09/9.1/9.1_b.js new file mode 100644 index 000000000..a0abc7fc1 --- /dev/null +++ b/js/src/tests/test262/intl402/ch09/9.1/9.1_b.js @@ -0,0 +1,32 @@ +// Copyright 2012 Mozilla Corporation. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @description Tests that appropriate fallback locales are provided for + * supported locales. + * @author Norbert Lindenberg + */ + +$INCLUDE("testIntl.js"); + +testWithIntlConstructors(function (Constructor) { + var info = getLocaleSupportInfo(Constructor); + var fallback; + info.supported.forEach(function (locale) { + var pos = locale.lastIndexOf("-"); + if (pos !== -1) { + fallback = locale.substring(0, pos); + if (info.supported.indexOf(fallback) === -1) { + $ERROR("Locale " + locale + " is supported, but fallback " + fallback + " isn't."); + } + } + var match = /([a-z]{2,3})(-[A-Z][a-z]{3})(-[A-Z]{2})/.exec(locale); + if (match !== null) { + fallback = match[1] + match[3]; + if (info.supported.indexOf(fallback) === -1) { + $ERROR("Locale " + locale + " is supported, but fallback " + fallback + " isn't."); + } + } + }); +}); + diff --git a/js/src/tests/test262/intl402/ch09/9.1/browser.js b/js/src/tests/test262/intl402/ch09/9.1/browser.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/intl402/ch09/9.1/browser.js diff --git a/js/src/tests/test262/intl402/ch09/9.1/shell.js b/js/src/tests/test262/intl402/ch09/9.1/shell.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/test262/intl402/ch09/9.1/shell.js |