aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/e_repository_TEST_exheres_0.cc
diff options
context:
space:
mode:
authorAvatar Wouter van Kesteren <woutershep@gmail.com> 2015-12-10 16:43:49 +0100
committerAvatar Wouter van Kesteren <woutershep@gmail.com> 2016-01-08 18:59:34 +0100
commit5cd1f72f94ddc2858ce5612db967ec62db3bed76 (patch)
treebf98cba4d91772fe10f6d32695f515798aa16fde /paludis/repositories/e/e_repository_TEST_exheres_0.cc
parentd08eaf3c81ade57e59af1d32e3135dfd31510077 (diff)
downloadpaludis-5cd1f72f94ddc2858ce5612db967ec62db3bed76.tar.gz
paludis-5cd1f72f94ddc2858ce5612db967ec62db3bed76.tar.xz
Test permitted_directories
Change-Id: I3017ac9e1d5d4527c5993d25e3beac5f94b50110 Reviewed-on: https://galileo.mailstation.de/gerrit/4659 Reviewed-by: Bo ├śrsted Andresen <zlin@exherbo.org>
Diffstat (limited to 'paludis/repositories/e/e_repository_TEST_exheres_0.cc')
-rw-r--r--paludis/repositories/e/e_repository_TEST_exheres_0.cc32
1 files changed, 32 insertions, 0 deletions
diff --git a/paludis/repositories/e/e_repository_TEST_exheres_0.cc b/paludis/repositories/e/e_repository_TEST_exheres_0.cc
index 0ccc21e5a..4116784d8 100644
--- a/paludis/repositories/e/e_repository_TEST_exheres_0.cc
+++ b/paludis/repositories/e/e_repository_TEST_exheres_0.cc
@@ -669,6 +669,38 @@ TEST(ERepository, ReallyInstallExheres0)
{
const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/permitted-directories-1",
+ &env, { })), nullptr, { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_THROW(id->perform_action(action), ActionFailedError);
+ }
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/permitted-directories-2",
+ &env, { })), nullptr, { }))]->last());
+ ASSERT_TRUE(bool(id));
+ id->perform_action(action);
+ }
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/permitted-directories-3",
+ &env, { })), nullptr, { }))]->last());
+ ASSERT_TRUE(bool(id));
+ EXPECT_THROW(id->perform_action(action), ActionFailedError);
+ }
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
+ PackageDepSpec(parse_user_package_dep_spec("=cat/permitted-directories-4",
+ &env, { })), nullptr, { }))]->last());
+ ASSERT_TRUE(bool(id));
+ id->perform_action(action);
+ }
+
+ {
+ const std::shared_ptr<const PackageID> id(*env[selection::RequireExactlyOne(generator::Matches(
PackageDepSpec(parse_user_package_dep_spec("=cat/exvolatile-1",
&env, { })), nullptr, { }))]->last());
ASSERT_TRUE(bool(id));