Commit | Line | Data |
---|---|---|
635c7876 | 1 | #!/usr/local/bin/perl -w |
2 | ||
3 | use strict ; | |
99709852 | 4 | use File::Slurp ; |
635c7876 | 5 | |
6 | use Carp ; | |
7 | use Socket ; | |
8 | use Symbol ; | |
99709852 | 9 | use Test::More tests => 6 ; |
635c7876 | 10 | |
11 | my $data = <<TEXT ; | |
12 | line 1 | |
13 | more text | |
14 | TEXT | |
15 | ||
16 | foreach 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 | } |