}
}
+}
+ /*}}}*/
+// Configuration::ClearAll - Clear everything /*{{{*/
+void Configuration::ClearAll()
+{
+ const Configuration::Item *Top = Tree(0);
+ while( Top != 0 )
+ {
+ Clear(Top->FullTag());
+ Top = Top->Next;
+ }
}
/*}}}*/
// Configuration::Clear - Clear an entire tree /*{{{*/
// clear a whole tree
void Clear(const std::string &Name);
+ void ClearAll();
// remove a certain value from a list (e.g. the list of "APT::Keep-Fds")
void Clear(std::string const &List, std::string const &Value);
equals(Cnf.FindFile("Dir::State"), "/srv/sid/var/lib/apt");
equals(Cnf.FindFile("Dir::Aptitude::State"), "/srv/sid/var/lib/aptitude");
+ Cnf.Set("Moo::Bar", "1");
+ Cnf.ClearAll();
+ equals(Cnf.Find("Moo::Bar"), "");
+
//FIXME: Test for configuration file parsing;
// currently only integration/ tests test them implicitly