more t/op/sort.t tests
[p5sagit/p5-mst-13.2.git] / t / op / misc.t
index decba2d..e3bf576 100755 (executable)
@@ -46,9 +46,6 @@ BEGIN
            "foo";
         }
 ########
--P 
-use POSIX;
-########
 $array[128]=1
 ########
 $x=0x0eabcd; print $x->ref;
@@ -172,3 +169,30 @@ BEGIN { undef = 0 }
 EXPECT
 Modification of a read-only value attempted at - line 1.
 BEGIN failed--compilation aborted at - line 1.
+########
+{
+    package foo;
+    sub PRINT {
+        shift;
+        print join(' ', reverse @_)."\n";
+    }
+    sub TIEHANDLE {
+        bless {}, shift;
+    }
+    sub READLINE {
+       "Out of inspiration";
+    }
+    sub DESTROY {
+       print "and destroyed as well\n";
+    }
+}
+{
+    local(*FOO);
+    tie(*FOO,'foo');
+    print FOO "sentence.", "reversed", "a", "is", "This";
+    print "-- ", <FOO>, " --\n";
+}
+EXPECT
+This is a reversed sentence.
+-- Out of inspiration --
+and destroyed as well