]> git.saurik.com Git - apt.git/blame - test/interactive-helper/test_udevcdrom.cc
Ensure we have a Policy in CacheFile.BuildDepCache()
[apt.git] / test / interactive-helper / test_udevcdrom.cc
CommitLineData
453b82a3
DK
1#include <config.h>
2
cbc9bed8 3#include <apt-pkg/cdrom.h>
cbc9bed8 4
453b82a3
DK
5#include <stddef.h>
6#include <string>
7#include <assert.h>
8f3ba4e8 8#include <vector>
472ff00e 9#include <iostream>
8f3ba4e8 10
cbc9bed8
MV
11int main()
12{
cbc9bed8
MV
13 pkgUdevCdromDevices c;
14 assert(c.Dlopen());
15
8f3ba4e8 16 std::vector<CdromDevice> l;
cbc9bed8 17 l = c.Scan();
f7f0d6c7 18 assert(l.empty() == false);
59f9dcbd 19 for (size_t i = 0; i < l.size(); ++i)
cbc9bed8
MV
20 std::cerr << l[i].DeviceName << " "
21 << l[i].Mounted << " "
22 << l[i].MountPath << std::endl;
cbc9bed8 23}