aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/vdb_repository_TEST.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/e/vdb_repository_TEST.cc')
-rw-r--r--paludis/repositories/e/vdb_repository_TEST.cc33
1 files changed, 14 insertions, 19 deletions
diff --git a/paludis/repositories/e/vdb_repository_TEST.cc b/paludis/repositories/e/vdb_repository_TEST.cc
index b8d95b714..d703fec8d 100644
--- a/paludis/repositories/e/vdb_repository_TEST.cc
+++ b/paludis/repositories/e/vdb_repository_TEST.cc
@@ -51,10 +51,10 @@ using namespace paludis;
namespace
{
- void cannot_uninstall(const std::tr1::shared_ptr<const PackageID> & id)
+ void do_uninstall(const std::tr1::shared_ptr<const PackageID> & id, const UninstallActionOptions & u)
{
- if (id)
- throw InternalError(PALUDIS_HERE, "cannot uninstall");
+ UninstallAction a(u);
+ id->perform_action(a);
}
std::tr1::shared_ptr<OutputManager> make_standard_output_manager(const Action &)
@@ -72,10 +72,6 @@ namespace
return mm->second;
}
- void dummy_used_this_for_config_protect(const std::string &)
- {
- }
-
WantPhase want_all_phases(const std::string &)
{
return wp_yes;
@@ -350,14 +346,14 @@ namespace test_cases
InstallAction install_action(make_named_values<InstallActionOptions>(
value_for<n::destination>(vdb_repo),
value_for<n::make_output_manager>(&make_standard_output_manager),
- value_for<n::perform_uninstall>(&cannot_uninstall),
+ value_for<n::perform_uninstall>(&do_uninstall),
value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
- value_for<n::used_this_for_config_protect>(&dummy_used_this_for_config_protect),
value_for<n::want_phase>(&want_all_phases)
));
UninstallAction uninstall_action(make_named_values<UninstallActionOptions>(
value_for<n::config_protect>(""),
+ value_for<n::is_overwrite>(false),
value_for<n::make_output_manager>(&make_standard_output_manager)
));
@@ -478,14 +474,14 @@ namespace test_cases
InstallAction install_action(make_named_values<InstallActionOptions>(
value_for<n::destination>(vdb_repo),
value_for<n::make_output_manager>(&make_standard_output_manager),
- value_for<n::perform_uninstall>(&cannot_uninstall),
+ value_for<n::perform_uninstall>(&do_uninstall),
value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
- value_for<n::used_this_for_config_protect>(&dummy_used_this_for_config_protect),
value_for<n::want_phase>(&want_all_phases)
));
UninstallAction uninstall_action(make_named_values<UninstallActionOptions>(
value_for<n::config_protect>(""),
+ value_for<n::is_overwrite>(false),
value_for<n::make_output_manager>(&make_standard_output_manager)
));
@@ -606,14 +602,14 @@ namespace test_cases
InstallAction install_action(make_named_values<InstallActionOptions>(
value_for<n::destination>(vdb_repo),
value_for<n::make_output_manager>(&make_standard_output_manager),
- value_for<n::perform_uninstall>(&cannot_uninstall),
+ value_for<n::perform_uninstall>(&do_uninstall),
value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
- value_for<n::used_this_for_config_protect>(&dummy_used_this_for_config_protect),
value_for<n::want_phase>(&want_all_phases)
));
UninstallAction uninstall_action(make_named_values<UninstallActionOptions>(
value_for<n::config_protect>(""),
+ value_for<n::is_overwrite>(false),
value_for<n::make_output_manager>(&make_standard_output_manager)
));
@@ -1006,14 +1002,14 @@ namespace test_cases
InstallAction install_action(make_named_values<InstallActionOptions>(
value_for<n::destination>(vdb_repo),
value_for<n::make_output_manager>(&make_standard_output_manager),
- value_for<n::perform_uninstall>(&cannot_uninstall),
+ value_for<n::perform_uninstall>(&do_uninstall),
value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
- value_for<n::used_this_for_config_protect>(&dummy_used_this_for_config_protect),
value_for<n::want_phase>(&want_all_phases)
));
UninstallAction uninstall_action(make_named_values<UninstallActionOptions>(
value_for<n::config_protect>(""),
+ value_for<n::is_overwrite>(false),
value_for<n::make_output_manager>(&make_standard_output_manager)
));
@@ -1247,9 +1243,8 @@ namespace test_cases
InstallAction install_action(make_named_values<InstallActionOptions>(
value_for<n::destination>(vdb_repo),
value_for<n::make_output_manager>(&make_standard_output_manager),
- value_for<n::perform_uninstall>(&cannot_uninstall),
+ value_for<n::perform_uninstall>(&do_uninstall),
value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
- value_for<n::used_this_for_config_protect>(&dummy_used_this_for_config_protect),
value_for<n::want_phase>(&want_all_phases)
));
@@ -1341,14 +1336,14 @@ namespace test_cases
InstallAction install_action(make_named_values<InstallActionOptions>(
value_for<n::destination>(vdb_repo),
value_for<n::make_output_manager>(&make_standard_output_manager),
- value_for<n::perform_uninstall>(&cannot_uninstall),
+ value_for<n::perform_uninstall>(&do_uninstall),
value_for<n::replacing>(make_shared_ptr(new PackageIDSequence)),
- value_for<n::used_this_for_config_protect>(&dummy_used_this_for_config_protect),
value_for<n::want_phase>(&want_all_phases)
));
UninstallAction uninstall_action(make_named_values<UninstallActionOptions>(
value_for<n::config_protect>(""),
+ value_for<n::is_overwrite>(false),
value_for<n::make_output_manager>(&make_standard_output_manager)
));