Re: the remaining bugs in \x escapes (was Re: [PATCH] oct and hex in glorious 64...
[p5sagit/p5-mst-13.2.git] / t / op / write.t
index e5baaa4..a86b4eb 100755 (executable)
@@ -7,7 +7,9 @@ BEGIN {
 
 print "1..44\n";
 
-my $CAT = ($^O eq 'MSWin32') ? 'type' : 'cat';
+my $CAT = ($^O eq 'MSWin32' || $^O eq 'NetWare') ? 'type'
+       : ($^O eq 'MacOS') ? 'catenate'
+        : 'cat';
 
 format OUT =
 the quick brown @<<
@@ -271,6 +273,12 @@ else
 
 # 12..44: scary format testing from Merijn H. Brand
 
+if ($^O eq 'VMS' || $^O eq 'MSWin32' || $^O eq 'dos' ||
+    ($^O eq 'os2' and not eval '$OS2::can_fork')) {
+  foreach (12..44) { print "ok $_ # skipped: '|-' and '-|' not supported\n"; }
+  exit(0);
+}
+
 use strict;    # Amazed that this hackery can be made strict ...
 
 # Just a complete test for format, including top-, left- and bottom marging
@@ -282,7 +290,9 @@ my $tm =  1;                # Top margin (empty lines before first output)
 my $bm =  2;           # Bottom marging (empty lines between last text and footer)
 my $lm =  4;           # Left margin (indent in spaces)
 
+select ((select (STDOUT), $| = 1)[0]);
 if ($lm > 0 and !open STDOUT, "|-") {  # Left margin (in this test ALWAYS set)
+    select ((select (STDOUT), $| = 1)[0]);
     my $i = 12;
     my $s = " " x $lm;
     while (<STDIN>) {