Test for change #11639.
authorJarkko Hietaniemi <jhi@iki.fi>
Sun, 12 Aug 2001 13:45:58 +0000 (13:45 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Sun, 12 Aug 2001 13:45:58 +0000 (13:45 +0000)
p4raw-link: @11639 on //depot/perl: 5b468f54a26b6cc5b994509b89b4ae0df54ab101

p4raw-id: //depot/perl@11640

t/op/tiehandle.t

index cb9a290..7ae3351 100755 (executable)
@@ -77,7 +77,7 @@ package main;
 
 use Symbol;
 
-print "1..35\n";
+print "1..38\n";
 
 my $fh = gensym;
 
@@ -189,3 +189,31 @@ ok($r == 1);
     untie *STDIN;
 }
 
+
+{
+    # test for change 11639: Can't localize *FH, then tie it
+    {
+       local *foo;
+       tie %foo, 'Blah';
+    }
+    ok(!tied %foo);
+
+    {
+       local *bar;
+       tie @bar, 'Blah';
+    }
+    ok(!tied @bar);
+
+    {
+       local *BAZ;
+       tie *BAZ, 'Blah';
+    }
+    ok(!tied *BAZ);
+
+    package Blah;
+
+    sub TIEHANDLE {bless {}}
+    sub TIEHASH   {bless {}}
+    sub TIEARRAY  {bless {}}
+}
+