[inseparable changes from match from perl-5.003_92 to perl-5.003_93]
[p5sagit/p5-mst-13.2.git] / t / op / misc.t
index d7a62dc..0f251ea 100755 (executable)
@@ -196,17 +196,34 @@ BEGIN failed--compilation aborted at - line 1.
     }
     sub DESTROY {
        print "and destroyed as well\n";
-    }
+  }
+  sub READ {
+      shift;
+      print STDOUT "foo->can(READ)(@_)\n";
+      return 100; 
+  }
+  sub GETC {
+      shift;
+      print STDOUT "Don't GETC, Get Perl\n";
+      return "a"; 
+  }    
 }
 {
     local(*FOO);
     tie(*FOO,'foo');
     print FOO "sentence.", "reversed", "a", "is", "This";
     print "-- ", <FOO>, " --\n";
+    my($buf,$len,$offset);
+    $buf = "string";
+    $len = 10; $offset = 1;
+    read(FOO, $buf, $len, $offset) == 100 or die "foo->READ failed";
+    getc(FOO) eq "a" or die "foo->GETC failed";
 }
 EXPECT
 This is a reversed sentence.
 -- Out of inspiration --
+foo->can(READ)(string 10 1)
+Don't GETC, Get Perl
 and destroyed as well
 ########
 my @a; $a[2] = 1; for (@a) { $_ = 2 } print "@a\n"