aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/exndbam_repository_TEST.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-02-03 17:16:50 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-02-03 17:16:50 +0000
commit63c8baae4819e82d0c03e5524b032d228dbb3487 (patch)
treeb362f6ea349ebbb2d12ea13b50c2d8f2b1932989 /paludis/repositories/e/exndbam_repository_TEST.cc
parent76dc8b38fcf2ff3619098b383ebacee3d7b5a35f (diff)
downloadpaludis-63c8baae4819e82d0c03e5524b032d228dbb3487.tar.gz
paludis-63c8baae4819e82d0c03e5524b032d228dbb3487.tar.xz
Split up VDBRepository. Add a new experimental Exndbam repository, which can replace VDB on systems that don't need EAPI 0/1 support.
Diffstat (limited to 'paludis/repositories/e/exndbam_repository_TEST.cc')
-rw-r--r--paludis/repositories/e/exndbam_repository_TEST.cc49
1 files changed, 49 insertions, 0 deletions
diff --git a/paludis/repositories/e/exndbam_repository_TEST.cc b/paludis/repositories/e/exndbam_repository_TEST.cc
new file mode 100644
index 000000000..ab72803ed
--- /dev/null
+++ b/paludis/repositories/e/exndbam_repository_TEST.cc
@@ -0,0 +1,49 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2008 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
+ * Public License version 2, as published by the Free Software Foundation.
+ *
+ * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <paludis/repositories/e/exndbam_repository.hh>
+#include <paludis/environments/test/test_environment.hh>
+#include <test/test_framework.hh>
+#include <test/test_runner.hh>
+
+using namespace test;
+using namespace paludis;
+
+namespace test_cases
+{
+ /**
+ * \test Test VDBRepository repo names
+ *
+ */
+ struct ExndbamRepositoryRepoNameTest : TestCase
+ {
+ ExndbamRepositoryRepoNameTest() : TestCase("repo name") { }
+
+ void run()
+ {
+ TestEnvironment env;
+ tr1::shared_ptr<Map<std::string, std::string> > keys(new Map<std::string, std::string>);
+ keys->insert("format", "exndbam");
+ keys->insert("location", "exndbam_repository_TEST_dir/repo1");
+ tr1::shared_ptr<Repository> repo(ExndbamRepository::make_exndbam_repository(&env, keys));
+ TEST_CHECK_STRINGIFY_EQUAL(repo->name(), "installed");
+ }
+ } test_exndbam_repository_repo_name;
+}
+