From a10837e75e1c04c36dcfc3167f5ce721f3658dc2 Mon Sep 17 00:00:00 2001 From: Olivier Thauvin Date: Wed, 16 Jan 2008 19:52:14 +0000 Subject: - handle cdmode flags in getdpath() --- t/01distribconf.t | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 't/01distribconf.t') 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" + ); +} + -- cgit v1.2.1