SYN SYN
[p5sagit/p5-mst-13.2.git] / t / op / closure.t
index 52d2272..5f3245f 100755 (executable)
@@ -7,12 +7,12 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    unshift @INC, '../lib';
+    @INC = '../lib';
 }
 
 use Config;
 
-print "1..170\n";
+print "1..171\n";
 
 my $test = 1;
 sub test (&) {
@@ -172,6 +172,15 @@ test {
   $foo[4]->()->(4)
 };
 
+{
+    my $w;
+    $w = sub {
+       my ($i) = @_;
+       test { $i == 10 };
+       sub { $w };
+    };
+    $w->(10);
+}
 
 # Additional tests by Tom Phoenix <rootbeer@teleport.com>.