}
$evalData = eval $data;
- $data = ref $evalData ? $evalData : [$evalData];
- push @tests, [$template, $data, $result, $comment];
+ $evalData = ref $evalData ? $evalData : [$evalData];
+ push @tests, [$template, $evalData, $result, $comment, $data];
}
print '1..', scalar @tests, "\n";
$w = ' INVALID';
} elsif ($_[0] =~ /^Use of uninitialized value/) {
$w = ' UNINIT';
+ } elsif ($_[0] =~ /^Missing argument/) {
+ $w = ' MISSING';
} else {
warn @_;
}
};
for ($i = 1; @tests; $i++) {
- ($template, $data, $result, $comment) = @{shift @tests};
+ ($template, $evalData, $result, $comment, $data) = @{shift @tests};
$w = undef;
- $x = sprintf(">$template<", @$data);
+ $x = sprintf(">$template<", @$evalData);
substr($x, -1, 0) = $w if $w;
# $x may have 3 exponent digits, not 2
my $y = $x;
>%vd< >"\01\02\03"< >1.2.3<
>%vd< >v1.2.3< >1.2.3<
>%vd< >[version::qv("1.2.3")]< >1.2.3<
->%vd< >[version->new("1.2")]< >1.200<
->%vd< >[version->new("1.02")]< >1.20<
+>%vd< >[version->new("1.2")]< >1.2<
+>%vd< >[version->new("1.02")]< >1.2<
>%vd< >[version->new("1.002")]< >1.2<
->%vd< >[version->new("1048576.5")]< >1048576.500<
->%vd< >[version->new("50")]< >50.0<
+>%vd< >[version->new("1048576.5")]< >1048576.5<
+>%vd< >[version->new("50")]< >50<
>%v.3d< >"\01\02\03"< >001.002.003<
>%0v3d< >"\01\02\03"< >001.002.003<
>%v.3d< >[version::qv("1.2.3")]< >001.002.003<
>%3$d %d %d< >[12, 34, 56]< >56 12 34<
>%2$*3$d %d< >[12, 34, 3]< > 34 12<
>%*3$2$d %d< >[12, 34, 3]< >%*3$2$d 12 INVALID<
->%2$d< >12< >0 UNINIT<
+>%2$d< >12< >0 MISSING<
>%0$d< >12< >%0$d INVALID<
>%1$$d< >12< >%1$$d INVALID<
>%1$1$d< >12< >%1$1$d INVALID<
>%#o< >0< >0<
>%#x< >0< >0<
>%2147483647$v2d< >''< ><
->%*2147483647$v2d< >''< > UNINIT<
+>%*2147483647$v2d< >''< > MISSING<