Subject: | subtests should say done_testing(); when done |
The attached patch fixes error messages like these:
t/10-tie-list.t ...
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/6 subtests
# Tests were run but no plan was declared and done_testing() was not
seen.
# Failed test 'direct access'
# at /usr/lib/perl5/5.12.1/Test/Builder.pm line 229.
# Tests were run but no plan was declared and done_testing() was not
seen.
Subject: | done_testing.patch |
--- Redis-1.902/t/20-tie-hash.t.orig 2011-02-01 10:15:09.000000000 +0100
+++ Redis-1.902/t/20-tie-hash.t 2011-02-21 02:45:25.000000000 +0100
@@ -39,6 +39,7 @@ subtest 'direct access' => sub {
is($my_hash{c}++, 'baz', 'get single value ok');
is(++$my_hash{c}, 'bbb', '... even with post/pre-increments');
+ done_testing();
};
@@ -57,6 +58,7 @@ subtest 'hash functions' => sub {
{foo => 'a', BAR => 'b', bbb => 'c'},
'reverse() worked'
);
+ done_testing();
};
--- Redis-1.902/t/10-tie-list.t.orig 2011-02-01 10:15:09.000000000 +0100
+++ Redis-1.902/t/10-tie-list.t 2011-02-21 02:45:34.000000000 +0100
@@ -30,6 +30,7 @@ subtest 'direct access' => sub {
is($my_list[2]++, 'baz', 'get single value ok');
is(++$my_list[2], 'bbb', '... even with post/pre-increments');
+ done_testing();
};
@@ -65,6 +66,7 @@ subtest 'list functions' => sub {
\@my_list,
['foo', 'BAR', 'bbb'],'... original list as expected'
);
+ done_testing();
};