summaryrefslogtreecommitdiff
path: root/test/interactive-helper/test_udevcdrom.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-09-13 18:00:22 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-09-13 18:00:22 +0200
commitafd7b358f94efddb83a2911ec1a21e7280074b1e (patch)
treefaa658f29d7dff42c6ed475037dd462384eab46e /test/interactive-helper/test_udevcdrom.cc
parent74b220028595342028e3309002e4ec359af328f9 (diff)
parent4e9108b8238438f1c390cb9ea9de598de1b7d7cb (diff)
merge with debian/sid
Diffstat (limited to 'test/interactive-helper/test_udevcdrom.cc')
-rw-r--r--test/interactive-helper/test_udevcdrom.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/interactive-helper/test_udevcdrom.cc b/test/interactive-helper/test_udevcdrom.cc
new file mode 100644
index 000000000..dc25ab357
--- /dev/null
+++ b/test/interactive-helper/test_udevcdrom.cc
@@ -0,0 +1,18 @@
+#include <apt-pkg/cdrom.h>
+#include <stdio.h>
+#include <assert.h>
+
+int main()
+{
+ pkgUdevCdromDevices c;
+ assert(c.Dlopen());
+
+ vector<CdromDevice> l;
+ l = c.Scan();
+ assert(l.empty() == false);
+ for (size_t i = 0; i < l.size(); ++i)
+ std::cerr << l[i].DeviceName << " "
+ << l[i].Mounted << " "
+ << l[i].MountPath << std::endl;
+
+}