Fix label on C<for(;;)> statement
[p5sagit/p5-mst-13.2.git] / t / io / inplace.t
old mode 100644 (file)
new mode 100755 (executable)
index b8a5649..2652c8b
@@ -2,12 +2,21 @@
 
 $^I = '.bak';
 
-# $Header: inplace.t,v 4.0 91/03/20 01:50:59 lwall Locked $
+# $RCSfile: inplace.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:29 $
 
 print "1..2\n";
 
 @ARGV = ('.a','.b','.c');
-`echo foo | tee .a .b .c`;
+if ($^O eq 'MSWin32') {
+  $CAT = '.\perl -e "print<>"';
+  `.\\perl -le "print 'foo'" > .a`;
+  `.\\perl -le "print 'foo'" > .b`;
+  `.\\perl -le "print 'foo'" > .c`;
+}
+else {
+  $CAT = 'cat';
+  `echo foo | tee .a .b .c`;
+}
 while (<>) {
     s/foo/bar/;
 }
@@ -15,7 +24,7 @@ continue {
     print;
 }
 
-if (`cat .a .b .c` eq "bar\nbar\nbar\n") {print "ok 1\n";} else {print "not ok 1\n";}
-if (`cat .a.bak .b.bak .c.bak` eq "foo\nfoo\nfoo\n") {print "ok 2\n";} else {print "not ok 2\n";}
+if (`$CAT .a .b .c` eq "bar\nbar\nbar\n") {print "ok 1\n";} else {print "not ok 1\n";}
+if (`$CAT .a.bak .b.bak .c.bak` eq "foo\nfoo\nfoo\n") {print "ok 2\n";} else {print "not ok 2\n";}
 
 unlink '.a', '.b', '.c', '.a.bak', '.b.bak', '.c.bak';