Obsolete
/
dnsmanagerv1
Archived
3
0
Fork 0
This repository has been archived on 2024-06-18. You can view files and clone it, but cannot push or open issues/pull-requests.
dnsmanagerv1/t/004_filutil.t

29 lines
511 B
Perl
Raw Normal View History

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;