summaryrefslogtreecommitdiff
path: root/lib/Locale/Codes/t/constants.t
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Locale/Codes/t/constants.t')
-rw-r--r--lib/Locale/Codes/t/constants.t49
1 files changed, 49 insertions, 0 deletions
diff --git a/lib/Locale/Codes/t/constants.t b/lib/Locale/Codes/t/constants.t
new file mode 100644
index 0000000000..359cdfc7a5
--- /dev/null
+++ b/lib/Locale/Codes/t/constants.t
@@ -0,0 +1,49 @@
+#!./perl
+#
+# constants.t - tests for Locale::Constants
+#
+
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
+use Locale::Constants;
+
+print "1..3\n";
+
+if (defined LOCALE_CODE_ALPHA_2
+ && defined LOCALE_CODE_ALPHA_3
+ && defined LOCALE_CODE_NUMERIC)
+{
+ print "ok 1\n";
+}
+else
+{
+ print "not ok 1\n";
+}
+
+if (LOCALE_CODE_ALPHA_2 != LOCALE_CODE_ALPHA_3
+ && LOCALE_CODE_ALPHA_2 != LOCALE_CODE_NUMERIC
+ && LOCALE_CODE_ALPHA_3 != LOCALE_CODE_NUMERIC)
+{
+ print "ok 2\n";
+}
+else
+{
+ print "not ok 2\n";
+}
+
+if (defined LOCALE_CODE_DEFAULT
+ && (LOCALE_CODE_DEFAULT == LOCALE_CODE_ALPHA_2
+ || LOCALE_CODE_DEFAULT == LOCALE_CODE_ALPHA_3
+ || LOCALE_CODE_DEFAULT == LOCALE_CODE_NUMERIC))
+{
+ print "ok 3\n";
+}
+else
+{
+ print "not ok 3\n";
+}
+
+exit 0;