1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
#!/usr/bin/perl -w
use Test::More tests => 3;
use Compress::Zlib;
BEGIN {
chdir 't' if -d 't';
use lib '../blib/lib', 'lib/', '..';
}
my $mod = "Parse::DebControl";
#Object initialization - 1 test
use_ok($mod);
ok($pdc = new Parse::DebControl(), "Parser object creation works fine");
#writegzip - 1 test
$pdc = new Parse::DebControl(1);
my $hash = {"Key1" => "value1", "Key2" => "value2","Key3" => "value3"};
my $gzipped = $pdc->write_mem($hash, {gzip => 1});
ok(
Compress::Zlib::memGunzip($gzipped) eq
$pdc->write_mem($hash),
"write_mem with the gzip option is sane");
|