summaryrefslogtreecommitdiff
path: root/test/libapt/cdromreducesourcelist_test.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-05-07 17:55:10 +0200
committerMichael Vogt <mvo@debian.org>2014-05-07 17:55:10 +0200
commit38d2959ffb8c6f5f291b2910014a67b1b352ab4c (patch)
treec5977b8f34aaf973ed3956952ec3ff43ac59f143 /test/libapt/cdromreducesourcelist_test.cc
parentfce69e7a0f38299c57ef96ae1c1dd9a5379bfd5a (diff)
parent3fa4e98f62e469f4292d2811b4e15f4afb678fbd (diff)
Merge branch 'debian/sid' into debian/experimental
Conflicts: apt-pkg/cachefilter.h apt-pkg/contrib/fileutl.cc apt-pkg/contrib/netrc.h apt-pkg/deb/debsrcrecords.cc apt-pkg/init.h apt-pkg/pkgcache.cc debian/apt.install.in debian/changelog
Diffstat (limited to 'test/libapt/cdromreducesourcelist_test.cc')
-rw-r--r--test/libapt/cdromreducesourcelist_test.cc86
1 files changed, 0 insertions, 86 deletions
diff --git a/test/libapt/cdromreducesourcelist_test.cc b/test/libapt/cdromreducesourcelist_test.cc
deleted file mode 100644
index 729da23a6..000000000
--- a/test/libapt/cdromreducesourcelist_test.cc
+++ /dev/null
@@ -1,86 +0,0 @@
-#include <apt-pkg/cdrom.h>
-#include <apt-pkg/error.h>
-
-#include <algorithm>
-#include <string>
-#include <vector>
-
-#include "assert.h"
-
-class Cdrom : public pkgCdrom {
-public:
- std::vector<std::string> ReduceSourcelist(std::string CD,std::vector<std::string> List) {
- pkgCdrom::ReduceSourcelist(CD, List);
- return List;
- }
-};
-
-int main(int argc, char const *argv[]) {
- Cdrom cd;
- std::vector<std::string> List;
- std::string CD("/media/cdrom/");
-
- std::vector<std::string> R = cd.ReduceSourcelist(CD, List);
- equals(R.empty(), true);
-
- List.push_back(" wheezy main");
- R = cd.ReduceSourcelist(CD, List);
- equals(R.size(), 1);
- equals(R[0], " wheezy main");
-
- List.push_back(" wheezy main");
- R = cd.ReduceSourcelist(CD, List);
- equals(R.size(), 1);
- equals(R[0], " wheezy main");
-
- List.push_back(" wheezy contrib");
- R = cd.ReduceSourcelist(CD, List);
- equals(R.size(), 1);
- equals(R[0], " wheezy contrib main");
-
- List.push_back(" wheezy-update contrib");
- R = cd.ReduceSourcelist(CD, List);
- equals(R.size(), 2);
- equals(R[0], " wheezy contrib main");
- equals(R[1], " wheezy-update contrib");
-
- List.push_back(" wheezy-update contrib");
- R = cd.ReduceSourcelist(CD, List);
- equals(R.size(), 2);
- equals(R[0], " wheezy contrib main");
- equals(R[1], " wheezy-update contrib");
-
- List.push_back(" wheezy-update non-free");
- R = cd.ReduceSourcelist(CD, List);
- equals(R.size(), 2);
- equals(R[0], " wheezy contrib main");
- equals(R[1], " wheezy-update contrib non-free");
-
- List.push_back(" wheezy-update main");
- R = cd.ReduceSourcelist(CD, List);
- equals(R.size(), 2);
- equals(R[0], " wheezy contrib main");
- equals(R[1], " wheezy-update contrib main non-free");
-
- List.push_back(" wheezy non-free");
- R = cd.ReduceSourcelist(CD, List);
- equals(R.size(), 2);
- equals(R[0], " wheezy contrib main non-free");
- equals(R[1], " wheezy-update contrib main non-free");
-
- List.push_back(" sid main");
- R = cd.ReduceSourcelist(CD, List);
- equals(R.size(), 3);
- equals(R[0], " sid main");
- equals(R[1], " wheezy contrib main non-free");
- equals(R[2], " wheezy-update contrib main non-free");
-
- List.push_back(" sid main-reduce");
- R = cd.ReduceSourcelist(CD, List);
- equals(R.size(), 3);
- equals(R[0], " sid main main-reduce");
- equals(R[1], " wheezy contrib main non-free");
- equals(R[2], " wheezy-update contrib main non-free");
-
- return 0;
-}