From: Jarkko Hietaniemi Date: Mon, 12 May 2003 19:34:10 +0000 (+0000) Subject: Work also without perlio. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1bb0a50fd869bf3d7f152d29ec8c8119703266a1;p=p5sagit%2Fp5-mst-13.2.git Work also without perlio. p4raw-id: //depot/perl@19502 --- diff --git a/t/io/dup.t b/t/io/dup.t index 21add4f..5f5653a 100755 --- a/t/io/dup.t +++ b/t/io/dup.t @@ -5,6 +5,8 @@ BEGIN { @INC = '../lib'; } +use Config; + my $test = 1; print "1..12\n"; print "ok 1\n"; @@ -59,21 +61,25 @@ unlink 'Io.dup'; print STDOUT "ok 8\n"; -open(F,">&",1) or die "Cannot dup to numeric 1:$!"; +open(F,">&",1) or die "Cannot dup to numeric 1: $!"; print F "ok 9\n"; close(F); -open(F,">&",'1') or die "Cannot dup to string '1':$!"; +open(F,">&",'1') or die "Cannot dup to string '1': $!"; print F "ok 10\n"; close(F); - -open(F,">&=",1) or die "Cannot dup to numeric 1:$!"; +open(F,">&=",1) or die "Cannot dup to numeric 1: $!"; print F "ok 11\n"; close(F); -open(F,">&=",'1') or die "Cannot dup to string '1':$!"; -print F "ok 12\n"; -close(F); - +if ($Config{useperlio}) { + open(F,">&=",'1') or die "Cannot dup to string '1': $!"; + print F "ok 12\n"; + close(F); +} else { + open(F, ">&DUPOUT") or die "Cannot dup stdout back: $!"; + print F "ok 12\n"; + close(F); +}