From 017f9fd68258b15ac4df5ae73b19ba6653711022 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 30 Jan 2012 13:13:29 +0100 Subject: * apt-pkg/contrib/configuration.cc: - do not stop parent transversal in FindDir if the value is empty See http://lists.debian.org/deity/2012/01/msg00053.html , too. --- test/libapt/configuration_test.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/libapt') diff --git a/test/libapt/configuration_test.cc b/test/libapt/configuration_test.cc index 5b23d17fb..9a3e2c118 100644 --- a/test/libapt/configuration_test.cc +++ b/test/libapt/configuration_test.cc @@ -71,6 +71,15 @@ int main(int argc,const char *argv[]) { equals(Cnf.Find("APT2::Version", "33"), "33"); equals(Cnf.FindI("APT2::Version", 33), 33); + equals(Cnf.FindFile("Dir::State"), ""); + equals(Cnf.FindFile("Dir::Aptitude::State"), ""); + Cnf.Set("Dir", "/srv/sid"); + equals(Cnf.FindFile("Dir::State"), ""); + Cnf.Set("Dir::State", "var/lib/apt"); + Cnf.Set("Dir::Aptitude::State", "var/lib/aptitude"); + equals(Cnf.FindFile("Dir::State"), "/srv/sid/var/lib/apt"); + equals(Cnf.FindFile("Dir::Aptitude::State"), "/srv/sid/var/lib/aptitude"); + //FIXME: Test for configuration file parsing; // currently only integration/ tests test them implicitly -- cgit v1.2.3-70-g09d2