]> git.vpit.fr Git - perl/modules/Scope-Upper.git/blobdiff - t/15-reap-multi.t
Introduce *5-*-multi.t tests
[perl/modules/Scope-Upper.git] / t / 15-reap-multi.t
similarity index 82%
rename from t/10-reap.t
rename to t/15-reap-multi.t
index 11919dd73f453aa78937095f3b7c7824ac590f77..a3f7f3ce8d5c37db7d33b8bdd16aca13a931ed9a 100644 (file)
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 4 + 8 + 8 + 18 + 4 + 8 + 6 + 11 + 5 + 17;
+use Test::More tests => 8 + 18 + 4 + 8 + 11 + 5 + 17;
 
 use Scope::Upper qw/reap/;
 
@@ -11,34 +11,6 @@ my $x;
 
 sub add { local $_; my $y = $_[1]; reap sub { $x += $y }, $_[0] + 1 }
 
-$x = 0;
-{
- is($x, 0, 'start');
- {
-  add(0, 1);
-  is($x, 0, '1 didn\'t run');
- }
- is($x, 1, '1 ran');
-}
-is($x, 1, 'end');
-
-$x = 0;
-{
- is($x, 0, 'start');
- local $_ = 3;
- is($_, 3, '$_ has the right value');
- {
-  add(0, 1);
-  is($_, 3, '$_ has the right value');
-  local $_ = 7;
-  is($_, 7, '$_ has the right value');
-  is($x, 0, '1 didn\'t run');
- }
- is($x, 1, '1 ran');
- is($_, 3, '$_ has the right value');
-}
-is($x, 1, 'end');
-
 $x = 0;
 {
  is($x, 0, 'start');
@@ -128,23 +100,6 @@ $x = 0;
 }
 is($x, 3, 'end');
 
-$x = 0;
-{
- is($x, 0, 'start');
- {
-  {
-   {
-    add(2, 1);
-    is($x, 0, '1 didn\'t run');
-   }
-   is($x, 0, '1 didn\'t run');
-  }
-  is($x, 0, '1 didn\'t run');
- }
- is($x, 1, '1 ran');
-}
-is($x, 1, 'end');
-
 $x = 0;
 {
  is($x, 0, 'start');