summaryrefslogtreecommitdiff
path: root/test/suite/intl402/ch06/6.2/6.2.4.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/suite/intl402/ch06/6.2/6.2.4.js')
-rw-r--r--test/suite/intl402/ch06/6.2/6.2.4.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/suite/intl402/ch06/6.2/6.2.4.js b/test/suite/intl402/ch06/6.2/6.2.4.js
new file mode 100644
index 000000000..6ca47af14
--- /dev/null
+++ b/test/suite/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;
+});
+