1use strict;
2use warnings;
3
4use Test::More tests => 4;
5
6use XS::APItest;
7
8my @cases = (
9    [field     => '%2$d'],
10    [precision => '%.*2$d'],
11    [vector    => '%2$vd'],
12    [width     => '%*2$d'],
13);
14
15for my $case (@cases) {
16    my ($what, $format) = @$case;
17    my $got = eval { test_sv_catpvf($format); 1 };
18    my $exn = $got ? undef : $@;
19    like($exn, qr/\b\QCannot yet reorder sv_vcatpvfn() arguments from va_list\E\b/,
20         "explicit $what index forbidden in va_list arguments");
21}
22