summaryrefslogtreecommitdiffstats
path: root/t/01distribconf.t
diff options
context:
space:
mode:
Diffstat (limited to 't/01distribconf.t')
-rw-r--r--t/01distribconf.t17
1 files changed, 16 insertions, 1 deletions
diff --git a/t/01distribconf.t b/t/01distribconf.t
index f73a154..94beb60 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 + 29 * scalar(keys %testdpath);
+plan tests => 16 + 29 * scalar(keys %testdpath);
use_ok('MDV::Distribconf');
@@ -115,3 +115,18 @@ like($dconf->getpath(undef, 'media_info'), qr!^/*infodir/?$!, "Can get media_inf
'getvalue works'
);
}
+
+{
+ my $dc = MDV::Distribconf->new('testdata/test3');
+ $dc->load();
+ is( $dc->getdpath('main', 'hdlist'),
+ $dc->getmediapath('main', 'hdlist'),
+ "Can get default path w/o cdmode"
+ );
+ $dc->{cfg}->newval('media_info', 'cdmode', 1);
+ is( $dc->getdpath('main', 'hdlist'),
+ $dc->getpath('main', 'hdlist'),
+ "Can get default path w/ cdmode"
+ );
+}
+