aboutsummaryrefslogtreecommitdiff
path: root/paludis/name_TEST.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-08-13 22:22:04 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-08-25 20:57:34 +0100
commitd3a6729806b151177a499da5045bc0565432ea6d (patch)
tree3002a66bfc8eedefc97f52602cc817574061ff1b /paludis/name_TEST.cc
parentefe1d56f129dea213603e2f2b58c14e529f2695f (diff)
downloadpaludis-d3a6729806b151177a499da5045bc0565432ea6d.tar.gz
paludis-d3a6729806b151177a499da5045bc0565432ea6d.tar.xz
Do sets differently
Sets from repositories are now named setname::repo, and we automatically create a master setname containing all of those sets. Cache sets cleanly whilst we're at it. Fixes: ticket:746
Diffstat (limited to 'paludis/name_TEST.cc')
-rw-r--r--paludis/name_TEST.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/paludis/name_TEST.cc b/paludis/name_TEST.cc
index b150557..9813b38 100644
--- a/paludis/name_TEST.cc
+++ b/paludis/name_TEST.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2005, 2006, 2007, 2008 Ciaran McCreesh
+ * Copyright (c) 2005, 2006, 2007, 2008, 2009 Ciaran McCreesh
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -312,6 +312,8 @@ namespace test_cases
SetName k("set0_-");
SetName k1("set0_-");
SetName k2("set0*");
+ SetName k3("set::foo");
+ SetName k4("set::foo*");
TEST_CHECK_THROWS(k = SetName(""), NameError);
TEST_CHECK_THROWS(k = SetName("!!!"), NameError);
TEST_CHECK_THROWS(k = SetName("~"), NameError);
@@ -323,6 +325,12 @@ namespace test_cases
TEST_CHECK_THROWS(k = SetName("set**"), NameError);
TEST_CHECK_THROWS(k = SetName("set*?"), NameError);
TEST_CHECK_THROWS(k = SetName("set?"), NameError);
+ TEST_CHECK_THROWS(k = SetName("set:::"), NameError);
+ TEST_CHECK_THROWS(k = SetName("set::"), NameError);
+ TEST_CHECK_THROWS(k = SetName("set:"), NameError);
+ TEST_CHECK_THROWS(k = SetName("set:foo"), NameError);
+ TEST_CHECK_THROWS(k = SetName("set:::foo"), NameError);
+ TEST_CHECK_THROWS(k = SetName("set::foo::bar"), NameError);
}
} test_set_name_validator;
}