git.shiar.nl
/
perl
/
list-index.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
skip subtests if Test::More is too old
[perl/list-index.git]
/
t
/
20-links.t
diff --git
a/t/20-links.t
b/t/20-links.t
index f22937a4f63f239e9cfd1c0bc4e8433aac734665..8fd54d0213f3fa35681d3045c30677354536b5eb 100644
(file)
--- a/
t/20-links.t
+++ b/
t/20-links.t
@@
-8,6
+8,13
@@
use Data::Dump 'pp';
BEGIN { use_ok('List::Index' => 'rangematch'); }
BEGIN { use_ok('List::Index' => 'rangematch'); }
+eval { Test::More->VERSION(0.93) } or eval q{
+ diag "Install Test::More v0.93 to run subtests\n";
+ sub subtest {
+ SKIP: { skip 'subtest', 1; }
+ }
+};
+
my @RANGETESTS = (
['single prefix',
[ q => 'q'],
my @RANGETESTS = (
['single prefix',
[ q => 'q'],
@@
-83,7
+90,7
@@
my @RANGETESTS = (
for (@RANGETESTS) {
my ($name, @tests) = @$_;
for (@RANGETESTS) {
my ($name, @tests) = @$_;
- subtest
$name => sub {
+ subtest
(
$name => sub {
plan tests => scalar @tests;
for (@tests) {
my ($in, $out) = @$_;
plan tests => scalar @tests;
for (@tests) {
my ($in, $out) = @$_;
@@
-94,6
+101,6
@@
for (@RANGETESTS) {
);
diag($@) if $@;
}
);
diag($@) if $@;
}
- };
+ }
)
;
}
}