This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make DosGlob.t more resilient
authorFather Chrysostomos <sprout@cpan.org>
Mon, 17 Dec 2012 01:00:45 +0000 (17:00 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 17 Dec 2012 01:19:08 +0000 (17:19 -0800)
If the sv count goes *down* (which doesn’t happen on my machine, but see
<CANgJU+W8_nVg9-YVRBe2r=ZYCbu9-R3RPf0tbH-XWrtVxYhGpA@mail.gmail.com>), we
certainly don’t have a leak.

ext/File-DosGlob/t/DosGlob.t

index b3e0043..600b87a 100644 (file)
@@ -151,5 +151,6 @@ SKIP: {
     $count = sv_count();
     eval '$x+'x(1+rand() * 100) . '<*>';
     $count2 = sv_count();
-    is $count2, $count, 'no leak when partly iterated caller is freed';
+    cmp_ok $count2, '<=', $count,
+     'no leak when partly iterated caller is freed';
 }