diff options
Diffstat (limited to 'js/src/tests/test262/intl402/ch06/6.2/6.2.4.js')
-rw-r--r-- | js/src/tests/test262/intl402/ch06/6.2/6.2.4.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/js/src/tests/test262/intl402/ch06/6.2/6.2.4.js b/js/src/tests/test262/intl402/ch06/6.2/6.2.4.js new file mode 100644 index 000000000..6ca47af14 --- /dev/null +++ b/js/src/tests/test262/intl402/ch06/6.2/6.2.4.js @@ -0,0 +1,19 @@ +// Copyright 2012 Mozilla Corporation. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @description Tests that the default locale is a String value representing the + * structurally valid and canonicalized BCP 47 language tag. + * @author Norbert Lindenberg + */ + +$INCLUDE("testIntl.js"); + +testWithIntlConstructors(function (Constructor) { + var defaultLocale = new Constructor().resolvedOptions().locale; + if (!isCanonicalizedStructurallyValidLanguageTag(defaultLocale)) { + $ERROR("Default locale \"" + defaultLocale + "\" is not canonicalized and structurally valid language tag."); + } + return true; +}); + |