]> git.saurik.com Git - apt.git/blob - test/libapt/cdromfindmountpointfordevice_test.cc
show upgradable packages after apt update
[apt.git] / test / libapt / cdromfindmountpointfordevice_test.cc
1 #include <config.h>
2
3 #include <apt-pkg/cdromutl.h>
4 #include <apt-pkg/configuration.h>
5
6 #include <string>
7 #include <vector>
8
9 #include "assert.h"
10
11 int main(int argc, char const *argv[]) {
12 if (argc != 2) {
13 std::cout << "One parameter expected - given " << argc << std::endl;
14 return 100;
15 }
16
17 _config->Set("Dir::state::Mountpoints", argv[1]);
18 equals("/", FindMountPointForDevice("rootfs"));
19 equals("/", FindMountPointForDevice("/dev/disk/by-uuid/fadcbc52-6284-4874-aaaa-dcee1f05fe21"));
20 equals("/sys", FindMountPointForDevice("sysfs"));
21 equals("/sys0", FindMountPointForDevice("sysfs0"));
22 equals("/boot/efi", FindMountPointForDevice("/dev/sda1"));
23 equals("/tmp", FindMountPointForDevice("tmpfs"));
24
25 return 0;
26 }