This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
APItest/t/utf8_warn_base.pl: Do test on all platforms
[perl5.git] / ext / XS-APItest / t / gv_init.t
CommitLineData
e6066781
BF
1#!perl
2
3use strict;
4use warnings;
04f3bf56 5use Test::More tests => 12;
e6066781
BF
6
7use XS::APItest;
8
04f3bf56 9is XS::APItest::gv_init_type("sanity_check", 0, 0, 0), "*main::sanity_check";
e6066781
BF
10ok $::{sanity_check};
11
12for my $type (0..3) {
04f3bf56 13 is XS::APItest::gv_init_type("test$type", 0, 0, $type), "*main::test$type";
e6066781
BF
14 ok $::{"test$type"};
15}
04f3bf56
BF
16
17my $latin_1 = "รจ";
18my $utf8 = "\x{30cb}";
19
20is XS::APItest::gv_init_type($latin_1, 0, 0, 1), "*main::$latin_1";
21is XS::APItest::gv_init_type($utf8, 0, 0, 1), "*main::$utf8";