23 ostream& operator<<(ostream& out, const set<string>& s)
25 for (set<string>::const_iterator i = s.begin();
37 using namespace ept::apt;
42 Test supportedFields()
46 "Priority: important\n"
48 "Installed-Size: 4368\n"
49 "Maintainer: APT Development Team <deity@lists.debian.org>\n"
50 "Architecture: amd64\n"
52 "Version: 0.6.46.4-0.1\n"
53 "Replaces: libapt-pkg-doc (<< 0.3.7), libapt-pkg-dev (<< 0.3.7)\n"
54 "Provides: libapt-pkg-libc6.3-6-3.11\n"
55 "Depends: libc6 (>= 2.3.5-1), libgcc1 (>= 1:4.1.1-12), libstdc++6 (>= 4.1.1-12), debian-archive-keyring\n"
56 "Pre-Depends: debtags (maybe)\n"
57 "Suggests: aptitude | synaptic | gnome-apt | wajig, dpkg-dev, apt-doc, bzip2\n"
58 "Recommends: debtags (maybe)\n"
60 "Conflicts: marameo\n"
61 "Filename: pool/main/a/apt/apt_0.6.46.4-0.1_amd64.deb\n"
63 "MD5sum: 1776421f80d6300c77a608e77a9f4a15\n"
64 "SHA1: 1bd7337d2df56d267632cf72ac930c0a4895898f\n"
65 "SHA256: b92442ab60046b4d0728245f39cc932f26e17db9f7933a5ec9aaa63172f51fda\n"
66 "Description: Advanced front-end for dpkg\n"
67 " This is Debian's next generation front-end for the dpkg package manager.\n"
68 " It provides the apt-get utility and APT dselect method that provides a\n"
69 " simpler, safer way to install and upgrade packages.\n"
71 " APT features complete installation ordering, multiple source capability\n"
72 " and several other unique features, see the Users Guide in apt-doc.\n"
73 "Build-Essential: yes\n"
74 "Tag: admin::package-management, filetransfer::ftp, filetransfer::http, hardware::storage:cd, interface::commandline, network::client, protocol::{ftp,http,ipv6}, role::program, suite::debian, use::downloading, use::searching, works-with::software:package\n";
78 assert_eq(p.
size(), 24u);
81 assert_eq(p.
priority(),
"important");
82 assert_eq(p.
section(),
"admin");
84 assert_eq(p.
maintainer(),
"APT Development Team <deity@lists.debian.org>");
86 assert_eq(p.
source(),
"apt");
87 assert_eq(p.
version(),
"0.6.46.4-0.1");
88 assert_eq(p.
replaces(),
"libapt-pkg-doc (<< 0.3.7), libapt-pkg-dev (<< 0.3.7)");
89 assert_eq(p.
provides(),
"libapt-pkg-libc6.3-6-3.11");
90 assert_eq(p.
depends(),
"libc6 (>= 2.3.5-1), libgcc1 (>= 1:4.1.1-12), libstdc++6 (>= 4.1.1-12), debian-archive-keyring");
93 assert_eq(p.
suggests(),
"aptitude | synaptic | gnome-apt | wajig, dpkg-dev, apt-doc, bzip2");
96 assert_eq(p.
filename(),
"pool/main/a/apt/apt_0.6.46.4-0.1_amd64.deb");
98 assert_eq(p.
md5sum(),
"1776421f80d6300c77a608e77a9f4a15");
99 assert_eq(p.
sha1(),
"1bd7337d2df56d267632cf72ac930c0a4895898f");
100 assert_eq(p.
sha256(),
"b92442ab60046b4d0728245f39cc932f26e17db9f7933a5ec9aaa63172f51fda");
101 assert_eq(p.
description(),
"Advanced front-end for dpkg\n"
102 " This is Debian's next generation front-end for the dpkg package manager.\n"
103 " It provides the apt-get utility and APT dselect method that provides a\n"
104 " simpler, safer way to install and upgrade packages.\n"
106 " APT features complete installation ordering, multiple source capability\n"
107 " and several other unique features, see the Users Guide in apt-doc.");
110 "This is Debian's next generation front-end for the dpkg package manager.\n"
111 " It provides the apt-get utility and APT dselect method that provides a\n"
112 " simpler, safer way to install and upgrade packages.\n"
114 " APT features complete installation ordering, multiple source capability\n"
115 " and several other unique features, see the Users Guide in apt-doc.");
118 std::set<std::string> tags;
119 tags.insert(
"admin::package-management");
120 tags.insert(
"filetransfer::ftp");
121 tags.insert(
"filetransfer::http");
122 tags.insert(
"hardware::storage:cd");
123 tags.insert(
"interface::commandline");
124 tags.insert(
"network::client");
125 tags.insert(
"protocol::ftp");
126 tags.insert(
"protocol::http");
127 tags.insert(
"protocol::ipv6");
128 tags.insert(
"role::program");
129 tags.insert(
"suite::debian");
130 tags.insert(
"use::downloading");
131 tags.insert(
"use::searching");
132 tags.insert(
"works-with::software:package");
133 assert_eq(p.
tag(), tags);