summaryrefslogtreecommitdiff
path: root/test/conf_clear.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/conf_clear.cc')
-rw-r--r--test/conf_clear.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/conf_clear.cc b/test/conf_clear.cc
new file mode 100644
index 000000000..259aa0f39
--- /dev/null
+++ b/test/conf_clear.cc
@@ -0,0 +1,23 @@
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/error.h>
+
+using namespace std;
+
+int main(int argc,const char *argv[])
+{
+ Configuration Cnf;
+
+ cout << "adding elements" << endl;
+ Cnf.Set("APT::Keep-Fds::",28);
+ Cnf.Set("APT::Keep-Fds::",17);
+ Cnf.Set("APT::Keep-Fds::",47);
+ Cnf.Dump();
+
+ cout << "Removing elements" << endl;
+ Cnf.Clear("APT::Keep-Fds",17);
+ Cnf.Clear("APT::Keep-Fds",28);
+ Cnf.Clear("APT::Keep-Fds",47);
+ Cnf.Dump();
+
+ return 0;
+}