summaryrefslogtreecommitdiff
path: root/t/stdin.t
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2011-06-07 08:06:16 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2011-06-07 08:06:16 +0000
commit9d4173f2716c2f9a2d26f8f9ab0f47b351b87de7 (patch)
tree98ae3fb82096d8bb96686512ada27fa72126b09a /t/stdin.t
downloadFile-Slurp-tarball-master.tar.gz
Diffstat (limited to 't/stdin.t')
-rw-r--r--t/stdin.t23
1 files changed, 23 insertions, 0 deletions
diff --git a/t/stdin.t b/t/stdin.t
new file mode 100644
index 0000000..071e0d3
--- /dev/null
+++ b/t/stdin.t
@@ -0,0 +1,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 ;
+}