The test suite tweak in #6101 wasn't quite right.
[p5sagit/p5-mst-13.2.git] / t / lib / io_dup.t
index f5d4544..c895fb4 100755 (executable)
@@ -3,7 +3,7 @@
 BEGIN {
     unless(grep /blib/, @INC) {
        chdir 't' if -d 't';
-       @INC = '../lib' if -d '../lib';
+       unshift @INC, '../lib' if -d '../lib';
     }
 }
 
@@ -39,8 +39,14 @@ $stderr->fdopen($stdout,"w");
 
 print $stdout "ok 2\n";
 print $stderr "ok 3\n";
-system 'echo ok 4';
-system 'echo ok 5 1>&2';
+if ($^O eq 'MSWin32') {
+    print `echo ok 4`;
+    print `echo ok 5 1>&2`; # does this *really* work?
+}
+else {
+    system 'echo ok 4';
+    system 'echo ok 5 1>&2';
+}
 
 $stderr->close;
 $stdout->close;
@@ -48,7 +54,8 @@ $stdout->close;
 $stdout->fdopen($dupout,"w");
 $stderr->fdopen($duperr,"w");
 
-system 'cat Io.dup';
+if ($^O eq 'MSWin32') { print `type Io.dup` }
+else                  { system 'cat Io.dup' }
 unlink 'Io.dup';
 
 print STDOUT "ok 6\n";