summaryrefslogtreecommitdiffstats
path: root/t/01distribconf.t
diff options
context:
space:
mode:
authorOlivier Thauvin <nanardon@mandriva.org>2007-07-19 17:06:05 +0000
committerOlivier Thauvin <nanardon@mandriva.org>2007-07-19 17:06:05 +0000
commit2c6017d9464f2e10834d9316e381bdb5c351e15e (patch)
tree8c6045ea87dd371413689a51c7a8c849ae5707d1 /t/01distribconf.t
parent4abe81dc4bbab339331c8952e121a95e03d556dc (diff)
downloadperl-MDV-Distribconf-2c6017d9464f2e10834d9316e381bdb5c351e15e.tar
perl-MDV-Distribconf-2c6017d9464f2e10834d9316e381bdb5c351e15e.tar.gz
perl-MDV-Distribconf-2c6017d9464f2e10834d9316e381bdb5c351e15e.tar.bz2
perl-MDV-Distribconf-2c6017d9464f2e10834d9316e381bdb5c351e15e.tar.xz
perl-MDV-Distribconf-2c6017d9464f2e10834d9316e381bdb5c351e15e.zip
- add getdpath and getfulldpath function
Diffstat (limited to 't/01distribconf.t')
-rw-r--r--t/01distribconf.t8
1 files changed, 7 insertions, 1 deletions
diff --git a/t/01distribconf.t b/t/01distribconf.t
index b411bea..987b284 100644
--- a/t/01distribconf.t
+++ b/t/01distribconf.t
@@ -12,7 +12,7 @@ my %testdpath = (
'http://server/path/' => 'testdata/test/media/media_info/media.cfg',
);
-plan tests => 14 + 22 * scalar(keys %testdpath);
+plan tests => 14 + 28 * scalar(keys %testdpath);
use_ok('MDV::Distribconf');
@@ -56,6 +56,12 @@ foreach my $path (keys %testdpath) {
like($dconf->getfullpath('main', 'hdlist'), qr!^/*$path/*media/+media_info/+hdlist_main.cz$!, "Can get media fullpath"); # vim color: */
like($dconf->getmediapath('main', 'hdlist'), qr!^/*media/+main/+media_info/+hdlist.cz$!, "Can get media path"); # vim color: */
like($dconf->getfullmediapath('main', 'hdlist'), qr!^/*$path/*media/+main/+media_info/+hdlist.cz$!, "Can get media fullpath"); # vim color: */
+ like($dconf->getdpath('main', 'hdlist'), qr!^/*media/+main/+media_info/+hdlist.cz$!, "can get dpath");
+ like($dconf->getfulldpath('main', 'hdlist'), qr!^/*$path/*media/+main/+media_info/+hdlist.cz$!, "can get fulldpath");
+ is($dconf->getdpath(undef, 'root'), $path, "can get fulldpath");
+ is($dconf->getfulldpath(undef, 'VERSION'), "$path/VERSION", "can get fulldpath");
+ is($dconf->getdpath('main', 'root'), $path, "can get fulldpath root even media is given");
+ is($dconf->getdpath('main', 'description'), 'media/media_info/description', "can get fulldpath description even media is given");
}
{