diff options
author | Olivier Thauvin <nanardon@mandriva.org> | 2004-12-20 12:25:12 +0000 |
---|---|---|
committer | Olivier Thauvin <nanardon@mandriva.org> | 2004-12-20 12:25:12 +0000 |
commit | cde5d14ee8dcc01db2d162cac51dd61c17c79673 (patch) | |
tree | 6ee2a121d9bda20358e349d0d3b3ab12ef59270f /t | |
parent | cb79b50bdae11bfb9cbfb0b3ebeaf7acfba5d1d4 (diff) | |
download | rpmtools-cde5d14ee8dcc01db2d162cac51dd61c17c79673.tar rpmtools-cde5d14ee8dcc01db2d162cac51dd61c17c79673.tar.gz rpmtools-cde5d14ee8dcc01db2d162cac51dd61c17c79673.tar.bz2 rpmtools-cde5d14ee8dcc01db2d162cac51dd61c17c79673.tar.xz rpmtools-cde5d14ee8dcc01db2d162cac51dd61c17c79673.zip |
- add infofile() function
- more doc
Diffstat (limited to 't')
-rwxr-xr-x | t/01packdrakeng.t | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/t/01packdrakeng.t b/t/01packdrakeng.t index 6fbb200..446ff8d 100755 --- a/t/01packdrakeng.t +++ b/t/01packdrakeng.t @@ -3,7 +3,7 @@ # $Id$ use strict; -use Test::More tests => 37; +use Test::More tests => 41; use Digest::MD5; use_ok('Packdrakeng'); @@ -111,6 +111,15 @@ ok($pack->add_virtual('l', "symlink", "dest"), "Adding a symlink"); $pack = undef; ok($pack = Packdrakeng->open(archive => "packtest.cz"), "Opening the archive"); +my ($type, $info); +($type, $info) = $pack->infofile("noexist"); +ok(!defined($type), "get info from an non existed file"); +($type, $info) = $pack->infofile("dir"); +ok($type eq 'd', "Get info from a dir"); +($type, $info) = $pack->infofile("symlink"); +ok($type eq 'l' && $info eq 'dest', "Get info from a dir"); +($type, $info) = $pack->infofile("coin"); +ok($type eq 'f' && $info eq length($coin), "Get info from a file"); ok($pack->extract("test", "dir"), "Extracting dir"); ok(-d "test/dir", "dir successfully restored"); ok($pack->extract("test", "symlink"), "Extracting symlink"); |