summaryrefslogtreecommitdiff
path: root/t/stdin.t
blob: 071e0d360b9f1dd74de8f30d0804dfedcb315d3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/local/bin/perl -w

use strict ;
use File::Slurp ;

use Carp ;
use Socket ;
use Symbol ;
use Test::More tests => 6 ;

my $data = <<TEXT ;
line 1
more text
TEXT

foreach my $file ( qw( stdin STDIN stdout STDOUT stderr STDERR ) ) {

	write_file( $file, $data ) ;
	my $read_buf = read_file( $file ) ;
	is( $read_buf, $data, 'read/write of file [$file]' ) ;

	unlink $file ;
}