diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2020-02-09 14:50:26 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-09 14:50:26 -0800 |
| commit | a33044c18637d3df6de93128d33dae1fb5ba575c (patch) | |
| tree | 273838dd27daed933e63bc7d29a28b569557755f /toolsrc/src/vcpkg-test | |
| parent | 039098c9546195a50e45c41e37d7e2b9168b4245 (diff) | |
| download | vcpkg-a33044c18637d3df6de93128d33dae1fb5ba575c.tar.gz vcpkg-a33044c18637d3df6de93128d33dae1fb5ba575c.zip | |
[vcpkg] Track parser row/col state in Paragraph (renamed from RawParagraph) (#9987)
Diffstat (limited to 'toolsrc/src/vcpkg-test')
| -rw-r--r-- | toolsrc/src/vcpkg-test/paragraph.cpp | 184 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg-test/statusparagraphs.cpp | 8 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg-test/update.cpp | 8 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg-test/util.cpp | 31 |
4 files changed, 119 insertions, 112 deletions
diff --git a/toolsrc/src/vcpkg-test/paragraph.cpp b/toolsrc/src/vcpkg-test/paragraph.cpp index 21da80c5b..ba929ac56 100644 --- a/toolsrc/src/vcpkg-test/paragraph.cpp +++ b/toolsrc/src/vcpkg-test/paragraph.cpp @@ -6,15 +6,35 @@ #include <vcpkg/paragraphs.h> namespace Strings = vcpkg::Strings; +using vcpkg::Parse::Paragraph; + +auto test_parse_control_file(const std::vector<std::unordered_map<std::string, std::string>>& v) +{ + std::vector<Paragraph> pghs; + for (auto&& p : v) + { + pghs.emplace_back(); + for (auto&& kv : p) + pghs.back().emplace(kv.first, std::make_pair(kv.second, vcpkg::Parse::TextRowCol{})); + } + return vcpkg::SourceControlFile::parse_control_file("", std::move(pghs)); +} + +auto test_make_binary_paragraph(const std::unordered_map<std::string, std::string>& v) +{ + Paragraph pgh; + for (auto&& kv : v) + pgh.emplace(kv.first, std::make_pair(kv.second, vcpkg::Parse::TextRowCol{})); + + return vcpkg::BinaryParagraph(std::move(pgh)); +} TEST_CASE ("SourceParagraph construct minimum", "[paragraph]") { - auto m_pgh = - vcpkg::SourceControlFile::parse_control_file("", - std::vector<std::unordered_map<std::string, std::string>>{{ - {"Source", "zlib"}, - {"Version", "1.2.8"}, - }}); + auto m_pgh = test_parse_control_file({{ + {"Source", "zlib"}, + {"Version", "1.2.8"}, + }}); REQUIRE(m_pgh.has_value()); auto& pgh = **m_pgh.get(); @@ -28,16 +48,14 @@ TEST_CASE ("SourceParagraph construct minimum", "[paragraph]") TEST_CASE ("SourceParagraph construct maximum", "[paragraph]") { - auto m_pgh = - vcpkg::SourceControlFile::parse_control_file("", - std::vector<std::unordered_map<std::string, std::string>>{{ - {"Source", "s"}, - {"Version", "v"}, - {"Maintainer", "m"}, - {"Description", "d"}, - {"Build-Depends", "bd"}, - {"Default-Features", "df"}, - }}); + auto m_pgh = test_parse_control_file({{ + {"Source", "s"}, + {"Version", "v"}, + {"Maintainer", "m"}, + {"Description", "d"}, + {"Build-Depends", "bd"}, + {"Default-Features", "df"}, + }}); REQUIRE(m_pgh.has_value()); auto& pgh = **m_pgh.get(); @@ -53,13 +71,11 @@ TEST_CASE ("SourceParagraph construct maximum", "[paragraph]") TEST_CASE ("SourceParagraph two depends", "[paragraph]") { - auto m_pgh = - vcpkg::SourceControlFile::parse_control_file("", - std::vector<std::unordered_map<std::string, std::string>>{{ - {"Source", "zlib"}, - {"Version", "1.2.8"}, - {"Build-Depends", "z, openssl"}, - }}); + auto m_pgh = test_parse_control_file({{ + {"Source", "zlib"}, + {"Version", "1.2.8"}, + {"Build-Depends", "z, openssl"}, + }}); REQUIRE(m_pgh.has_value()); auto& pgh = **m_pgh.get(); @@ -70,13 +86,11 @@ TEST_CASE ("SourceParagraph two depends", "[paragraph]") TEST_CASE ("SourceParagraph three depends", "[paragraph]") { - auto m_pgh = - vcpkg::SourceControlFile::parse_control_file("", - std::vector<std::unordered_map<std::string, std::string>>{{ - {"Source", "zlib"}, - {"Version", "1.2.8"}, - {"Build-Depends", "z, openssl, xyz"}, - }}); + auto m_pgh = test_parse_control_file({{ + {"Source", "zlib"}, + {"Version", "1.2.8"}, + {"Build-Depends", "z, openssl, xyz"}, + }}); REQUIRE(m_pgh.has_value()); auto& pgh = **m_pgh.get(); @@ -88,13 +102,11 @@ TEST_CASE ("SourceParagraph three depends", "[paragraph]") TEST_CASE ("SourceParagraph construct qualified depends", "[paragraph]") { - auto m_pgh = - vcpkg::SourceControlFile::parse_control_file("", - std::vector<std::unordered_map<std::string, std::string>>{{ - {"Source", "zlib"}, - {"Version", "1.2.8"}, - {"Build-Depends", "liba (windows), libb (uwp)"}, - }}); + auto m_pgh = test_parse_control_file({{ + {"Source", "zlib"}, + {"Version", "1.2.8"}, + {"Build-Depends", "liba (windows), libb (uwp)"}, + }}); REQUIRE(m_pgh.has_value()); auto& pgh = **m_pgh.get(); @@ -111,13 +123,11 @@ TEST_CASE ("SourceParagraph construct qualified depends", "[paragraph]") TEST_CASE ("SourceParagraph default features", "[paragraph]") { - auto m_pgh = - vcpkg::SourceControlFile::parse_control_file("", - std::vector<std::unordered_map<std::string, std::string>>{{ - {"Source", "a"}, - {"Version", "1.0"}, - {"Default-Features", "a1"}, - }}); + auto m_pgh = test_parse_control_file({{ + {"Source", "a"}, + {"Version", "1.0"}, + {"Default-Features", "a1"}, + }}); REQUIRE(m_pgh.has_value()); auto& pgh = **m_pgh.get(); @@ -127,7 +137,7 @@ TEST_CASE ("SourceParagraph default features", "[paragraph]") TEST_CASE ("BinaryParagraph construct minimum", "[paragraph]") { - vcpkg::BinaryParagraph pgh({ + auto pgh = test_make_binary_paragraph({ {"Package", "zlib"}, {"Version", "1.2.8"}, {"Architecture", "x86-windows"}, @@ -144,7 +154,7 @@ TEST_CASE ("BinaryParagraph construct minimum", "[paragraph]") TEST_CASE ("BinaryParagraph construct maximum", "[paragraph]") { - vcpkg::BinaryParagraph pgh({ + auto pgh = test_make_binary_paragraph({ {"Package", "s"}, {"Version", "v"}, {"Architecture", "x86-windows"}, @@ -164,7 +174,7 @@ TEST_CASE ("BinaryParagraph construct maximum", "[paragraph]") TEST_CASE ("BinaryParagraph three depends", "[paragraph]") { - vcpkg::BinaryParagraph pgh({ + auto pgh = test_make_binary_paragraph({ {"Package", "zlib"}, {"Version", "1.2.8"}, {"Architecture", "x86-windows"}, @@ -180,7 +190,7 @@ TEST_CASE ("BinaryParagraph three depends", "[paragraph]") TEST_CASE ("BinaryParagraph abi", "[paragraph]") { - vcpkg::BinaryParagraph pgh({ + auto pgh = test_make_binary_paragraph({ {"Package", "zlib"}, {"Version", "1.2.8"}, {"Architecture", "x86-windows"}, @@ -194,7 +204,7 @@ TEST_CASE ("BinaryParagraph abi", "[paragraph]") TEST_CASE ("BinaryParagraph default features", "[paragraph]") { - vcpkg::BinaryParagraph pgh({ + auto pgh = test_make_binary_paragraph({ {"Package", "a"}, {"Version", "1.0"}, {"Architecture", "x86-windows"}, @@ -220,7 +230,7 @@ TEST_CASE ("parse paragraphs one field", "[paragraph]") auto pghs = vcpkg::Paragraphs::parse_paragraphs(str, "").value_or_exit(VCPKG_LINE_INFO); REQUIRE(pghs.size() == 1); REQUIRE(pghs[0].size() == 1); - REQUIRE(pghs[0]["f1"] == "v1"); + REQUIRE(pghs[0]["f1"].first == "v1"); } TEST_CASE ("parse paragraphs one pgh", "[paragraph]") @@ -230,8 +240,8 @@ TEST_CASE ("parse paragraphs one pgh", "[paragraph]") auto pghs = vcpkg::Paragraphs::parse_paragraphs(str, "").value_or_exit(VCPKG_LINE_INFO); REQUIRE(pghs.size() == 1); REQUIRE(pghs[0].size() == 2); - REQUIRE(pghs[0]["f1"] == "v1"); - REQUIRE(pghs[0]["f2"] == "v2"); + REQUIRE(pghs[0]["f1"].first == "v1"); + REQUIRE(pghs[0]["f2"].first == "v2"); } TEST_CASE ("parse paragraphs two pgh", "[paragraph]") @@ -245,11 +255,11 @@ TEST_CASE ("parse paragraphs two pgh", "[paragraph]") REQUIRE(pghs.size() == 2); REQUIRE(pghs[0].size() == 2); - REQUIRE(pghs[0]["f1"] == "v1"); - REQUIRE(pghs[0]["f2"] == "v2"); + REQUIRE(pghs[0]["f1"].first == "v1"); + REQUIRE(pghs[0]["f2"].first == "v2"); REQUIRE(pghs[1].size() == 2); - REQUIRE(pghs[1]["f3"] == "v3"); - REQUIRE(pghs[1]["f4"] == "v4"); + REQUIRE(pghs[1]["f3"].first == "v3"); + REQUIRE(pghs[1]["f4"].first == "v4"); } TEST_CASE ("parse paragraphs field names", "[paragraph]") @@ -286,8 +296,8 @@ TEST_CASE ("parse paragraphs empty fields", "[paragraph]") REQUIRE(pghs.size() == 1); REQUIRE(pghs[0].size() == 2); - REQUIRE(pghs[0]["f1"] == ""); - REQUIRE(pghs[0]["f2"] == ""); + REQUIRE(pghs[0]["f1"].first == ""); + REQUIRE(pghs[0]["f2"].first == ""); REQUIRE(pghs[0].size() == 2); } @@ -301,8 +311,8 @@ TEST_CASE ("parse paragraphs multiline fields", "[paragraph]") auto pghs = vcpkg::Paragraphs::parse_paragraphs(str, "").value_or_exit(VCPKG_LINE_INFO); REQUIRE(pghs.size() == 1); - REQUIRE(pghs[0]["f1"] == "simple\n f1"); - REQUIRE(pghs[0]["f2"] == "\n f2\n continue"); + REQUIRE(pghs[0]["f1"].first == "simple\n f1"); + REQUIRE(pghs[0]["f2"].first == "\n f2\n continue"); } TEST_CASE ("parse paragraphs crlfs", "[paragraph]") @@ -316,11 +326,11 @@ TEST_CASE ("parse paragraphs crlfs", "[paragraph]") REQUIRE(pghs.size() == 2); REQUIRE(pghs[0].size() == 2); - REQUIRE(pghs[0]["f1"] == "v1"); - REQUIRE(pghs[0]["f2"] == "v2"); + REQUIRE(pghs[0]["f1"].first == "v1"); + REQUIRE(pghs[0]["f2"].first == "v2"); REQUIRE(pghs[1].size() == 2); - REQUIRE(pghs[1]["f3"] == "v3"); - REQUIRE(pghs[1]["f4"] == "v4"); + REQUIRE(pghs[1]["f3"].first == "v3"); + REQUIRE(pghs[1]["f4"].first == "v4"); } TEST_CASE ("parse paragraphs comment", "[paragraph]") @@ -338,11 +348,11 @@ TEST_CASE ("parse paragraphs comment", "[paragraph]") REQUIRE(pghs.size() == 2); REQUIRE(pghs[0].size() == 2); - REQUIRE(pghs[0]["f1"] == "v1"); - REQUIRE(pghs[0]["f2"] == "v2"); + REQUIRE(pghs[0]["f1"].first == "v1"); + REQUIRE(pghs[0]["f2"].first == "v2"); REQUIRE(pghs[1].size()); - REQUIRE(pghs[1]["f3"] == "v3"); - REQUIRE(pghs[1]["f4"] == "v4"); + REQUIRE(pghs[1]["f3"].first == "v3"); + REQUIRE(pghs[1]["f4"].first == "v4"); } TEST_CASE ("parse comment before single line feed", "[paragraph]") @@ -351,12 +361,12 @@ TEST_CASE ("parse comment before single line feed", "[paragraph]") "#comment\n"; auto pghs = vcpkg::Paragraphs::parse_paragraphs(str, "").value_or_exit(VCPKG_LINE_INFO); REQUIRE(pghs[0].size() == 1); - REQUIRE(pghs[0]["f1"] == "v1"); + REQUIRE(pghs[0]["f1"].first == "v1"); } TEST_CASE ("BinaryParagraph serialize min", "[paragraph]") { - vcpkg::BinaryParagraph pgh({ + auto pgh = test_make_binary_paragraph({ {"Package", "zlib"}, {"Version", "1.2.8"}, {"Architecture", "x86-windows"}, @@ -367,16 +377,16 @@ TEST_CASE ("BinaryParagraph serialize min", "[paragraph]") REQUIRE(pghs.size() == 1); REQUIRE(pghs[0].size() == 5); - REQUIRE(pghs[0]["Package"] == "zlib"); - REQUIRE(pghs[0]["Version"] == "1.2.8"); - REQUIRE(pghs[0]["Architecture"] == "x86-windows"); - REQUIRE(pghs[0]["Multi-Arch"] == "same"); - REQUIRE(pghs[0]["Type"] == "Port"); + REQUIRE(pghs[0]["Package"].first == "zlib"); + REQUIRE(pghs[0]["Version"].first == "1.2.8"); + REQUIRE(pghs[0]["Architecture"].first == "x86-windows"); + REQUIRE(pghs[0]["Multi-Arch"].first == "same"); + REQUIRE(pghs[0]["Type"].first == "Port"); } TEST_CASE ("BinaryParagraph serialize max", "[paragraph]") { - vcpkg::BinaryParagraph pgh({ + auto pgh = test_make_binary_paragraph({ {"Package", "zlib"}, {"Version", "1.2.8"}, {"Architecture", "x86-windows"}, @@ -390,18 +400,18 @@ TEST_CASE ("BinaryParagraph serialize max", "[paragraph]") REQUIRE(pghs.size() == 1); REQUIRE(pghs[0].size() == 8); - REQUIRE(pghs[0]["Package"] == "zlib"); - REQUIRE(pghs[0]["Version"] == "1.2.8"); - REQUIRE(pghs[0]["Architecture"] == "x86-windows"); - REQUIRE(pghs[0]["Multi-Arch"] == "same"); - REQUIRE(pghs[0]["Description"] == "first line\n second line"); - REQUIRE(pghs[0]["Depends"] == "dep"); - REQUIRE(pghs[0]["Type"] == "Port"); + REQUIRE(pghs[0]["Package"].first == "zlib"); + REQUIRE(pghs[0]["Version"].first == "1.2.8"); + REQUIRE(pghs[0]["Architecture"].first == "x86-windows"); + REQUIRE(pghs[0]["Multi-Arch"].first == "same"); + REQUIRE(pghs[0]["Description"].first == "first line\n second line"); + REQUIRE(pghs[0]["Depends"].first == "dep"); + REQUIRE(pghs[0]["Type"].first == "Port"); } TEST_CASE ("BinaryParagraph serialize multiple deps", "[paragraph]") { - vcpkg::BinaryParagraph pgh({ + auto pgh = test_make_binary_paragraph({ {"Package", "zlib"}, {"Version", "1.2.8"}, {"Architecture", "x86-windows"}, @@ -412,12 +422,12 @@ TEST_CASE ("BinaryParagraph serialize multiple deps", "[paragraph]") auto pghs = vcpkg::Paragraphs::parse_paragraphs(ss, "").value_or_exit(VCPKG_LINE_INFO); REQUIRE(pghs.size() == 1); - REQUIRE(pghs[0]["Depends"] == "a, b, c"); + REQUIRE(pghs[0]["Depends"].first == "a, b, c"); } TEST_CASE ("BinaryParagraph serialize abi", "[paragraph]") { - vcpkg::BinaryParagraph pgh({ + auto pgh = test_make_binary_paragraph({ {"Package", "zlib"}, {"Version", "1.2.8"}, {"Architecture", "x86-windows"}, @@ -429,5 +439,5 @@ TEST_CASE ("BinaryParagraph serialize abi", "[paragraph]") auto pghs = vcpkg::Paragraphs::parse_paragraphs(ss, "").value_or_exit(VCPKG_LINE_INFO); REQUIRE(pghs.size() == 1); - REQUIRE(pghs[0]["Abi"] == "123abc"); + REQUIRE(pghs[0]["Abi"].first == "123abc"); } diff --git a/toolsrc/src/vcpkg-test/statusparagraphs.cpp b/toolsrc/src/vcpkg-test/statusparagraphs.cpp index c755948b5..acb8b333c 100644 --- a/toolsrc/src/vcpkg-test/statusparagraphs.cpp +++ b/toolsrc/src/vcpkg-test/statusparagraphs.cpp @@ -24,7 +24,7 @@ Status: install ok installed REQUIRE(pghs); StatusParagraphs status_db( - Util::fmap(*pghs.get(), [](RawParagraph& rpgh) { return std::make_unique<StatusParagraph>(std::move(rpgh)); })); + Util::fmap(*pghs.get(), [](Paragraph& rpgh) { return std::make_unique<StatusParagraph>(std::move(rpgh)); })); auto it = status_db.find_installed({"ffmpeg", Triplet::X64_WINDOWS}); REQUIRE(it != status_db.end()); @@ -45,7 +45,7 @@ Status: purge ok not-installed REQUIRE(pghs); StatusParagraphs status_db( - Util::fmap(*pghs.get(), [](RawParagraph& rpgh) { return std::make_unique<StatusParagraph>(std::move(rpgh)); })); + Util::fmap(*pghs.get(), [](Paragraph& rpgh) { return std::make_unique<StatusParagraph>(std::move(rpgh)); })); auto it = status_db.find_installed({"ffmpeg", Triplet::X64_WINDOWS}); REQUIRE(it == status_db.end()); @@ -74,7 +74,7 @@ Status: purge ok not-installed REQUIRE(pghs); StatusParagraphs status_db( - Util::fmap(*pghs.get(), [](RawParagraph& rpgh) { return std::make_unique<StatusParagraph>(std::move(rpgh)); })); + Util::fmap(*pghs.get(), [](Paragraph& rpgh) { return std::make_unique<StatusParagraph>(std::move(rpgh)); })); auto it = status_db.find_installed({"ffmpeg", Triplet::X64_WINDOWS}); REQUIRE(it != status_db.end()); @@ -106,7 +106,7 @@ Status: install ok installed REQUIRE(pghs); StatusParagraphs status_db( - Util::fmap(*pghs.get(), [](RawParagraph& rpgh) { return std::make_unique<StatusParagraph>(std::move(rpgh)); })); + Util::fmap(*pghs.get(), [](Paragraph& rpgh) { return std::make_unique<StatusParagraph>(std::move(rpgh)); })); // Feature "openssl" is installed and should therefore be found auto it = status_db.find_installed({{"ffmpeg", Triplet::X64_WINDOWS}, "openssl"}); diff --git a/toolsrc/src/vcpkg-test/update.cpp b/toolsrc/src/vcpkg-test/update.cpp index a362df720..5370a8421 100644 --- a/toolsrc/src/vcpkg-test/update.cpp +++ b/toolsrc/src/vcpkg-test/update.cpp @@ -20,7 +20,7 @@ TEST_CASE ("find outdated packages basic", "[update]") StatusParagraphs status_db(std::move(status_paragraphs)); std::unordered_map<std::string, SourceControlFileLocation> map; - auto scf = unwrap(SourceControlFile::parse_control_file("", Pgh{{{"Source", "a"}, {"Version", "0"}}})); + auto scf = unwrap(test_parse_control_file({{{"Source", "a"}, {"Version", "0"}}})); map.emplace("a", SourceControlFileLocation{std::move(scf), ""}); PortFileProvider::MapPortFileProvider provider(map); @@ -44,7 +44,7 @@ TEST_CASE ("find outdated packages features", "[update]") StatusParagraphs status_db(std::move(status_paragraphs)); std::unordered_map<std::string, SourceControlFileLocation> map; - auto scf = unwrap(SourceControlFile::parse_control_file("", Pgh{{{"Source", "a"}, {"Version", "0"}}})); + auto scf = unwrap(test_parse_control_file({{{"Source", "a"}, {"Version", "0"}}})); map.emplace("a", SourceControlFileLocation{std::move(scf), ""}); PortFileProvider::MapPortFileProvider provider(map); @@ -70,7 +70,7 @@ TEST_CASE ("find outdated packages features 2", "[update]") StatusParagraphs status_db(std::move(status_paragraphs)); std::unordered_map<std::string, SourceControlFileLocation> map; - auto scf = unwrap(SourceControlFile::parse_control_file("", Pgh{{{"Source", "a"}, {"Version", "0"}}})); + auto scf = unwrap(test_parse_control_file({{{"Source", "a"}, {"Version", "0"}}})); map.emplace("a", SourceControlFileLocation{std::move(scf), ""}); PortFileProvider::MapPortFileProvider provider(map); @@ -91,7 +91,7 @@ TEST_CASE ("find outdated packages none", "[update]") StatusParagraphs status_db(std::move(status_paragraphs)); std::unordered_map<std::string, SourceControlFileLocation> map; - auto scf = unwrap(SourceControlFile::parse_control_file("", Pgh{{{"Source", "a"}, {"Version", "2"}}})); + auto scf = unwrap(test_parse_control_file({{{"Source", "a"}, {"Version", "2"}}})); map.emplace("a", SourceControlFileLocation{std::move(scf), ""}); PortFileProvider::MapPortFileProvider provider(map); diff --git a/toolsrc/src/vcpkg-test/util.cpp b/toolsrc/src/vcpkg-test/util.cpp index ae02e3ab0..d754baec1 100644 --- a/toolsrc/src/vcpkg-test/util.cpp +++ b/toolsrc/src/vcpkg-test/util.cpp @@ -58,7 +58,7 @@ namespace vcpkg::Test {"Build-Depends", feature.second}, }); } - auto m_pgh = vcpkg::SourceControlFile::parse_control_file("", std::move(scf_pghs)); + auto m_pgh = test_parse_control_file(std::move(scf_pghs)); REQUIRE(m_pgh.has_value()); return std::move(*m_pgh.get()); } @@ -68,14 +68,13 @@ namespace vcpkg::Test const char* default_features, const char* triplet) { - using Pgh = std::unordered_map<std::string, std::string>; - return std::make_unique<StatusParagraph>(Pgh{{"Package", name}, - {"Version", "1"}, - {"Architecture", triplet}, - {"Multi-Arch", "same"}, - {"Depends", depends}, - {"Default-Features", default_features}, - {"Status", "install ok installed"}}); + return std::make_unique<StatusParagraph>(Parse::Paragraph{{"Package", {name, {}}}, + {"Version", {"1", {}}}, + {"Architecture", {triplet, {}}}, + {"Multi-Arch", {"same", {}}}, + {"Depends", {depends, {}}}, + {"Default-Features", {default_features, {}}}, + {"Status", {"install ok installed", {}}}}); } std::unique_ptr<StatusParagraph> make_status_feature_pgh(const char* name, @@ -83,14 +82,12 @@ namespace vcpkg::Test const char* depends, const char* triplet) { - using Pgh = std::unordered_map<std::string, std::string>; - return std::make_unique<StatusParagraph>(Pgh{{"Package", name}, - {"Version", "1"}, - {"Feature", feature}, - {"Architecture", triplet}, - {"Multi-Arch", "same"}, - {"Depends", depends}, - {"Status", "install ok installed"}}); + return std::make_unique<StatusParagraph>(Parse::Paragraph{{"Package", {name, {}}}, + {"Feature", {feature, {}}}, + {"Architecture", {triplet, {}}}, + {"Multi-Arch", {"same", {}}}, + {"Depends", {depends, {}}}, + {"Status", {"install ok installed", {}}}}); } PackageSpec PackageSpecMap::emplace(const char* name, |
