aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/e_repository_TEST.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/e/e_repository_TEST.cc')
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc19
1 files changed, 7 insertions, 12 deletions
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index b1c81d50b..c9330f651 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -91,6 +91,12 @@ namespace
{
return wp_yes;
}
+
+ std::string contents(const std::string & filename)
+ {
+ SafeIFStream s(FSPath(filename).realpath());
+ return std::string((std::istreambuf_iterator<char>(s)), std::istreambuf_iterator<char>());
+ }
}
TEST(ERepository, RepoName)
@@ -654,18 +660,7 @@ TEST(ERepository, Manifest)
env.add_repository(1, repo);
repo->make_manifest(QualifiedPackageName("category/package"));
- std::multiset<std::string> made_manifest, reference_manifest;
- SafeIFStream made_manifest_stream(FSPath("e_repository_TEST_dir/repo11/category/package/Manifest")),
- reference_manifest_stream(FSPath("e_repository_TEST_dir/repo11/Manifest_correct"));
-
- std::string line;
-
- while ( getline(made_manifest_stream, line) )
- made_manifest.insert(line);
- while ( getline(reference_manifest_stream, line) )
- reference_manifest.insert(line);
-
- EXPECT_TRUE(made_manifest == reference_manifest);
+ EXPECT_EQ(contents("e_repository_TEST_dir/repo11/Manifest_correct"), contents("e_repository_TEST_dir/repo11/category/package/Manifest"));
EXPECT_THROW(repo->make_manifest(QualifiedPackageName("category/package-b")), MissingDistfileError);
}