File: slurp.t

package info (click to toggle)
libfile-slurp-perl 9999.09-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 172 kB
  • ctags: 26
  • sloc: perl: 872; makefile: 37
file content (22 lines) | stat: -rw-r--r-- 311 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/local/bin/perl -w

use strict ;

use Test::More tests => 2 ;

BEGIN{ 
	use_ok( 'File::Slurp', qw( write_file slurp ) ) ;
}

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

my $file = 'xxx' ;

write_file( $file, $data ) ;
my $read_buf = slurp( $file ) ;
is( $read_buf, $data, 'slurp alias' ) ;

unlink $file ;