cleanup
[urisagit/Perl-Docs.git] / t / stdin.t
CommitLineData
635c7876 1#!/usr/local/bin/perl -w
2
3use strict ;
99709852 4use File::Slurp ;
635c7876 5
6use Carp ;
7use Socket ;
8use Symbol ;
99709852 9use Test::More tests => 6 ;
635c7876 10
11my $data = <<TEXT ;
12line 1
13more text
14TEXT
15
16foreach my $file ( qw( stdin STDIN stdout STDOUT stderr STDERR ) ) {
17
18 write_file( $file, $data ) ;
19 my $read_buf = read_file( $file ) ;
20 is( $read_buf, $data, 'read/write of file [$file]' ) ;
21
22 unlink $file ;
23}