aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/tests.plan.cpp
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2018-02-26 05:19:05 -0800
committerRobert Schumacher <roschuma@microsoft.com>2018-02-26 05:19:05 -0800
commit2e135bf09677163fc20364f9d46ba4248042ae1a (patch)
treed7e932f814989abf81aa8ed9c4553a5a85752759 /toolsrc/src/tests.plan.cpp
parent99e674d331eea8f6b7ca260f27900ff5afda1755 (diff)
downloadvcpkg-2e135bf09677163fc20364f9d46ba4248042ae1a.tar.gz
vcpkg-2e135bf09677163fc20364f9d46ba4248042ae1a.zip
[vcpkg] Fix issue when removing packages that have explicit feature dependencies.
Diffstat (limited to 'toolsrc/src/tests.plan.cpp')
-rw-r--r--toolsrc/src/tests.plan.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/toolsrc/src/tests.plan.cpp b/toolsrc/src/tests.plan.cpp
index 546e20b0d..d33ab290d 100644
--- a/toolsrc/src/tests.plan.cpp
+++ b/toolsrc/src/tests.plan.cpp
@@ -780,6 +780,21 @@ namespace UnitTest1
Assert::AreEqual("vtk", remove_plan[1].spec.name().c_str());
Assert::AreEqual("expat", remove_plan[2].spec.name().c_str());
}
+
+ TEST_METHOD(features_depend_core_remove_scheme)
+ {
+ std::vector<std::unique_ptr<StatusParagraph>> pghs;
+ pghs.push_back(make_status_pgh("curl", "", "", "x64"));
+ pghs.push_back(make_status_pgh("cpr", "curl[core]", "", "x64"));
+ StatusParagraphs status_db(std::move(pghs));
+
+ auto remove_plan = Dependencies::create_remove_plan(
+ {unsafe_pspec("curl", Triplet::from_canonical_name("x64"))}, status_db);
+
+ Assert::AreEqual(size_t(2), remove_plan.size());
+ Assert::AreEqual("cpr", remove_plan[0].spec.name().c_str());
+ Assert::AreEqual("curl", remove_plan[1].spec.name().c_str());
+ }
};
class UpgradePlanTests : public TestClass<UpgradePlanTests>