From cbc9bed8ae85af36ad8579476ab91e89c3cd310e Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 9 Jul 2009 17:16:05 +0200 Subject: move libudev based code into libapt cdrom.cc class --- test/makefile | 6 ++++++ test/test_udevcdrom.cc | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 test/test_udevcdrom.cc (limited to 'test') diff --git a/test/makefile b/test/makefile index a9dbdc34d..fb9123d0a 100644 --- a/test/makefile +++ b/test/makefile @@ -68,6 +68,12 @@ SLIBS = -lapt-pkg SOURCE = hash.cc include $(PROGRAM_H) +# Program for testing udevcdrom +PROGRAM=test_udevcdrom +SLIBS = -lapt-pkg +SOURCE = test_udevcdrom.cc +include $(PROGRAM_H) + # Program for checking rpm versions PROGRAM=rpmver SLIBS = -lapt-pkg -lrpm diff --git a/test/test_udevcdrom.cc b/test/test_udevcdrom.cc new file mode 100644 index 000000000..e65c7a297 --- /dev/null +++ b/test/test_udevcdrom.cc @@ -0,0 +1,19 @@ +#include +#include +#include + +int main() +{ + int i; + pkgUdevCdromDevices c; + assert(c.Dlopen()); + + vector l; + l = c.Scan(); + assert(l.size() > 0); + for (i=0;i