summaryrefslogtreecommitdiff
path: root/ext/XS-APItest/t/labelconst.t
diff options
context:
space:
mode:
Diffstat (limited to 'ext/XS-APItest/t/labelconst.t')
-rw-r--r--ext/XS-APItest/t/labelconst.t77
1 files changed, 76 insertions, 1 deletions
diff --git a/ext/XS-APItest/t/labelconst.t b/ext/XS-APItest/t/labelconst.t
index 79fe9d2212..f3a7d9c9cd 100644
--- a/ext/XS-APItest/t/labelconst.t
+++ b/ext/XS-APItest/t/labelconst.t
@@ -1,7 +1,7 @@
use warnings;
use strict;
-use Test::More tests => 18;
+use Test::More tests => 32;
BEGIN { $^H |= 0x20000; }
@@ -93,4 +93,79 @@ $t = do("t/labelconst.aux");
is $@, "";
is $t, "FOOBARBAZQUUX";
+{
+ use utf8;
+ use open qw( :utf8 :std );
+
+ $t = "";
+ eval q{
+ use XS::APItest qw(labelconst);
+ $t .= "ㅏ";
+ $t .= labelconst ᛒ:;
+ $t .= "ḉ";
+ };
+ is $@, "";
+ is $t, "ㅏᛒḉ";
+
+ $t = "";
+ eval q{
+ use XS::APItest qw(labelconst);
+ $t .= "ㅏ";
+ $t .= "ᛒ" . labelconst FǑǑ: . "ḉ";
+ $t .= "d";
+ };
+ is $@, "";
+ is $t, "ㅏᛒFǑǑḉd";
+
+ $t = "";
+ eval q{
+ use XS::APItest qw(labelconst);
+ $t .= "ㅏ";
+ $t .= labelconst FǑǑ :;
+ $t .= "ᛒ";
+ };
+ is $@, "";
+ is $t, "ㅏFǑǑᛒ";
+
+ $t = "";
+ eval q{
+ use XS::APItest qw(labelconst);
+ $t .= "ㅏ";
+ $t .= labelconst F_1Ḅ:;
+ $t .= "ᛒ";
+ };
+ is $@, "";
+ is $t, "ㅏF_1Ḅᛒ";
+
+ $t = "";
+ eval q{
+ use XS::APItest qw(labelconst);
+ $t .= "ㅏ";
+ $t .= labelconst _AḄ:;
+ $t .= "ᛒ";
+ };
+ is $@, "";
+ is $t, "ㅏ_AḄᛒ";
+
+ $t = "";
+ eval q{
+ use XS::APItest qw(labelconst);
+ no warnings;
+ $t .= "ㅏ";
+ $t .= labelconst 1AḄ:;
+ $t .= "ᛒ";
+ };
+ isnt $@, "";
+ is $t, "";
+
+}
+
+{
+ use utf8;
+ $t = "";
+ $t = do("t/labelconst_utf8.aux");
+ is $@, "";
+ is $t, "FǑǑBÀRᛒÀZQÙÙX";
+}
+
1;