6 use Test::More tests => 24;
12 ok !XS::APItest::gv_fetchmethod_flags_type(\%::, "nothing", 1, 0);
14 for my $type ( 1..3 ) {
15 is XS::APItest::gv_fetchmethod_flags_type(\%::, "method", $type, 0), "*main::method", "Sanity check";
18 ok !XS::APItest::gv_fetchmethod_flags_type(\%::, "method\0not quite!", 1, 0), "gv_fetchmethod_flags_sv() is nul-clean";
19 ok !XS::APItest::gv_fetchmethod_flags_type(\%::, "method\0not quite!", 3, 0), "gv_fetchmethod_flags_pvn() is nul-clean";
21 ok XS::APItest::gv_fetchmethod_flags_type(\%::, "method\0not quite!", 0, 0), "gv_fetchmethod_flags() is not nul-clean";
22 is XS::APItest::gv_fetchmethod_flags_type(\%::, "method\0not quite!", 2, 0), "*main::method", "gv_fetchmethod_flags_pv() is not nul-clean";
26 use open qw( :utf8 :std );
34 "\357\275\215\357\275\205\357\275\224\357\275\210\357\275\217\357\275\204";
36 for my $type ( 1..3 ) {
37 ::is XS::APItest::gv_fetchmethod_flags_type(\%main::, "method", $type, 0), "*main::method";
38 ::ok !XS::APItest::gv_fetchmethod_flags_type(\%main::, $meth_as_octets, $type, 0);
39 ::is XS::APItest::gv_fetchmethod_flags_type(\%main::, "method", $type, 0), "*main::method";
43 ::ok !XS::APItest::gv_fetchmethod_flags_type(
44 \%{"\357\275\215\357\275\201\357\275\211\357\275\216::"},
46 ::ok !XS::APItest::gv_fetchmethod_flags_type(
47 \%{"\357\275\215\357\275\201\357\275\211\357\275\216::"},
53 # [perl #129267] Buffer overrun when argument name ends with colon and
54 # there is a colon past the end. This used to segv.
55 XS::APItest::gv_fetchmethod_flags_type(\%::, "method:::::", 4, 7);
56 # With type 4, 7 is the length