This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
new perldelta
[perl5.git] / ext / XS-APItest / t / subsignature.t
CommitLineData
996b0cb8
PE
1use warnings;
2use strict;
3
4use Test::More;
5
6BEGIN { $^H |= 0x20000; }
7
8my @t;
9
10@t = ();
11eval q{
12 use experimental 'signatures';
13 use XS::APItest qw(subsignature);
14 push @t, (subsignature $x, $y);
15 push @t, (subsignature $z, $);
16 push @t, (subsignature @rest);
17 push @t, (subsignature %rest);
18 push @t, (subsignature $one = 1);
19};
20is $@, "";
21is_deeply \@t, [
22 ['nextstate:4', 'argcheck:2:0:-', 'argelem:$x', 'argelem:$y'],
23 ['nextstate:5', 'argcheck:2:0:-', 'argelem:$z',],
24 ['nextstate:6', 'argcheck:0:0:@', 'argelem:@rest'],
25 ['nextstate:7', 'argcheck:0:0:%', 'argelem:%rest'],
26 ['nextstate:8', 'argcheck:1:1:-', 'argelem:$one:d'],
27];
28
29done_testing;