summaryrefslogtreecommitdiff
path: root/test/interactive-helper/test_udevcdrom.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-08-17 12:06:37 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-08-17 12:06:37 +0200
commit369c919f2be8d2c93b990a97436b41ba4ae1ff29 (patch)
tree8f547c2705e5132fa7f775a1b9d7eca69f9c0840 /test/interactive-helper/test_udevcdrom.cc
parent7c69574c5bec814cc3cb58701d2beccfe6093add (diff)
move the interactive helper to a subdirectory of test
Diffstat (limited to 'test/interactive-helper/test_udevcdrom.cc')
-rw-r--r--test/interactive-helper/test_udevcdrom.cc19
1 files changed, 19 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..577e2d013
--- /dev/null
+++ b/test/interactive-helper/test_udevcdrom.cc
@@ -0,0 +1,19 @@
+#include <apt-pkg/cdrom.h>
+#include <stdio.h>
+#include <assert.h>
+
+int main()
+{
+ int i;
+ pkgUdevCdromDevices c;
+ assert(c.Dlopen());
+
+ vector<CdromDevice> l;
+ l = c.Scan();
+ assert(l.empty() == false);
+ for (i=0;i<l.size();i++)
+ std::cerr << l[i].DeviceName << " "
+ << l[i].Mounted << " "
+ << l[i].MountPath << std::endl;
+
+}