| 1 |
use warnings; |
| 2 |
use strict; |
| 3 |
|
| 4 |
use Test::More; |
| 5 |
|
| 6 |
BEGIN { $^H |= 0x20000; } |
| 7 |
|
| 8 |
my @t; |
| 9 |
|
| 10 |
@t = (); |
| 11 |
eval 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 |
}; |
| 20 |
is $@, ""; |
| 21 |
is_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 |
|
| 29 |
done_testing; |