summaryrefslogtreecommitdiff
path: root/test/libapt/configuration_test.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-01-31 11:21:02 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2012-01-31 11:21:02 +0100
commitc7ed2c0e34546e12a035e4c4c2f034a6ee765748 (patch)
treedcfd5eb735b8ea547142be68f993a3f555ecb0b0 /test/libapt/configuration_test.cc
parent3102af74e7ffaab3f47741c05451ce7f0e3b38fe (diff)
parentb9ed63d39e8771f42ec74e3ad401b7c1e846b206 (diff)
merged from lp:~donkult/apt/experimental/
Diffstat (limited to 'test/libapt/configuration_test.cc')
-rw-r--r--test/libapt/configuration_test.cc9
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