You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
511 B

use Test::More;
use Modern::Perl;
use URI;
use lib 'lib';
use fileutil ':all';
my $f1 = "lib/fileutil.pm";
my $p1 = "read_file";
my $f2 = "/tmp/test";
my $d2 = "DATA";
sub t_read_file {
my ($f, $pattern) = @_;
my $data = read_file $f;
$data =~ /$pattern/;
}
sub t_write_file {
my ($f, $data) = @_;
write_file $f, $data;
my $d = read_file $f;
$d =~ /$data/;
}
ok ((t_read_file $f1, $p1) , "read_file avec $f1 / $p1" );
ok ((t_write_file $f2, $d2) , "write_file" );
done_testing;