summaryrefslogtreecommitdiff
path: root/test/libapt/configuration_test.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-01-30 21:16:56 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2012-01-30 21:16:56 +0100
commitbdd64a80842fea20d69741cbc01f1929c51a6ed6 (patch)
treea4d680abe2d44987ee939daeb3f691570a2e2ad8 /test/libapt/configuration_test.cc
parent6487ecc977eabcca059e4e7fd62545c9826282bd (diff)
parenta13554816fac2ab7c5e876355f7b929790722b2c (diff)
merged from lp:~mvo/apt/mvo (and 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