diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2012-01-30 13:13:29 +0100 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2012-01-30 13:13:29 +0100 |
commit | 017f9fd68258b15ac4df5ae73b19ba6653711022 (patch) | |
tree | 77abdd6251d49b1a26f4f3cdefac7618aa511381 /test | |
parent | 9535a4db891b629dc17354171bce0a0f41e48d4a (diff) | |
download | apt-017f9fd68258b15ac4df5ae73b19ba6653711022.tar.gz |
* 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.
Diffstat (limited to 'test')
-rw-r--r-- | test/libapt/configuration_test.cc | 9 |
1 files changed, 9 insertions, 0 deletions
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 |