summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2005-11-03 02:09:30 +0000
committerSteve Peters <steve@fisharerojo.org>2005-11-03 02:09:30 +0000
commit1031ca5cb29f226276d55908e55745187e79d1c8 (patch)
tree1ef4054b3123139e5110b1c920753db6daf5e398 /t
parent1255842222d74612a763d6a1e3384771918fd55a (diff)
downloadperl-1031ca5cb29f226276d55908e55745187e79d1c8.tar.gz
Clean up some test files.
p4raw-id: //depot/perl@25967
Diffstat (limited to 't')
-rwxr-xr-xt/io/argv.t5
-rw-r--r--t/io/crlf_through.t1
-rwxr-xr-xt/io/dup.t1
-rw-r--r--t/io/layers.t2
-rw-r--r--t/io/through.t15
5 files changed, 18 insertions, 6 deletions
diff --git a/t/io/argv.t b/t/io/argv.t
index 33c4f1a8e7..8a63c65833 100755
--- a/t/io/argv.t
+++ b/t/io/argv.t
@@ -72,7 +72,10 @@ undef $^I;
ok( eof TRY );
-ok( eof NEVEROPENED, 'eof() true on unopened filehandle' );
+{
+ no warnings 'once';
+ ok( eof NEVEROPENED, 'eof() true on unopened filehandle' );
+}
open STDIN, 'Io_argv1.tmp' or die $!;
@ARGV = ();
diff --git a/t/io/crlf_through.t b/t/io/crlf_through.t
index 3a5522a76e..c08099598e 100644
--- a/t/io/crlf_through.t
+++ b/t/io/crlf_through.t
@@ -5,5 +5,6 @@ BEGIN {
@INC = '../lib';
}
+no warnings 'once';
$main::use_crlf = 1;
do './io/through.t' or die "no kid script";
diff --git a/t/io/dup.t b/t/io/dup.t
index 8247b8e6ef..48497fd232 100755
--- a/t/io/dup.t
+++ b/t/io/dup.t
@@ -7,6 +7,7 @@ BEGIN {
}
use Config;
+no warnings 'once';
my $test = 1;
print "1..26\n";
diff --git a/t/io/layers.t b/t/io/layers.t
index 5fcb4f633f..62f77e864a 100644
--- a/t/io/layers.t
+++ b/t/io/layers.t
@@ -40,6 +40,8 @@ if (${^UNICODE} & 1) {
# Unconditional
$UNICODE_STDIN = 1;
}
+} else {
+ $UNICODE_STDIN = 0;
}
my $NTEST = 44 - (($DOSISH || !$FASTSTDIO) ? 7 : 0) - ($DOSISH ? 5 : 0)
+ $UNICODE_STDIN;
diff --git a/t/io/through.t b/t/io/through.t
index d664b08a18..9c8a627f9d 100644
--- a/t/io/through.t
+++ b/t/io/through.t
@@ -34,7 +34,8 @@ $c += 6; # Tests with sleep()...
print "1..$c\n";
my $set_out = '';
-$set_out = "binmode STDOUT, ':crlf'" if $main::use_crlf = 1;
+$set_out = "binmode STDOUT, ':crlf'"
+ if defined $main::use_crlf && $main::use_crlf == 1;
sub testread ($$$$$$$) {
my ($fh, $str, $read_c, $how_r, $write_c, $how_w, $why) = @_;
@@ -76,7 +77,8 @@ sub testpipe ($$$$$$) {
} else {
die "Unrecognized write: '$how_w'";
}
- binmode $fh, ':crlf' if $main::use_crlf = 1;
+ binmode $fh, ':crlf'
+ if defined $main::use_crlf && $main::use_crlf == 1;
testread($fh, $str, $read_c, $how_r, $write_c, $how_w, "pipe$why");
}
@@ -86,7 +88,8 @@ sub testfile ($$$$$$) {
open my $fh, '>', 'io_io.tmp' or die;
select $fh;
- binmode $fh, ':crlf' if $main::use_crlf = 1;
+ binmode $fh, ':crlf'
+ if defined $main::use_crlf && $main::use_crlf == 1;
if ($how_w eq 'print') { # AUTOFLUSH???
$| = 0;
print $fh $_ for @data;
@@ -100,7 +103,8 @@ sub testfile ($$$$$$) {
}
close $fh or die "close: $!";
open $fh, '<', 'io_io.tmp' or die;
- binmode $fh, ':crlf' if $main::use_crlf = 1;
+ binmode $fh, ':crlf'
+ if defined $main::use_crlf && $main::use_crlf == 1;
testread($fh, $str, $read_c, $how_r, $write_c, $how_w, "file$why");
}
@@ -109,7 +113,8 @@ open my $fh, '-|', qq[$Perl -we "eval qq(\\x24\\x7c = 1) or die; binmode STDOUT;
ok(1, 'open pipe');
binmode $fh, q(:crlf);
ok(1, 'binmode');
-my (@c, $c);
+$c = undef;
+my @c;
push @c, ord $c while $c = getc $fh;
ok(1, 'got chars');
is(scalar @c, 9, 'got 9 chars');