more t/op/sort.t tests
[p5sagit/p5-mst-13.2.git] / t / op / misc.t
index 8fdd11a..e3bf576 100755 (executable)
@@ -169,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