projects
/
urisagit/Perl-Docs.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
initial commit
[urisagit/Perl-Docs.git]
/
t
/
slurp.t
1
#!/usr/local/bin/perl -w
2
3
use strict ;
4
5
use Test::More tests => 2 ;
6
7
BEGIN{
8
use_ok( 'File::Slurp', qw( write_file slurp ) ) ;
9
}
10
11
my $data = <<TEXT ;
12
line 1
13
more text
14
TEXT
15
16
my $file = 'xxx' ;
17
18
write_file( $file, $data ) ;
19
my $read_buf = slurp( $file ) ;
20
is( $read_buf, $data, 'slurp alias' ) ;
21
22
unlink $file ;