aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2008-04-15 18:34:46 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2008-04-15 18:34:46 +0000
commit36be590659fb25103e4a97112aff02c67f4fd167 (patch)
treec09e7d03ce36805de1186746fd6134d81ac11770
parent5d772b93f057ee32959e9ae9344162514899590e (diff)
downloadpaludis-36be590659fb25103e4a97112aff02c67f4fd167.tar.gz
paludis-36be590659fb25103e4a97112aff02c67f4fd167.tar.xz
Add some more tests.
-rw-r--r--paludis/set_file_TEST.cc13
-rwxr-xr-xpaludis/set_file_TEST_setup.sh3
2 files changed, 11 insertions, 5 deletions
diff --git a/paludis/set_file_TEST.cc b/paludis/set_file_TEST.cc
index 137a6ad..9bbb7b3 100644
--- a/paludis/set_file_TEST.cc
+++ b/paludis/set_file_TEST.cc
@@ -143,15 +143,17 @@ namespace test_cases
{
SetSpecStringifier p;
f.contents()->accept(p);
- TEST_CHECK_STRINGIFY_EQUAL(p.s.str(), "( >=bar/baz-1.23 ) ");
+ TEST_CHECK_STRINGIFY_EQUAL(p.s.str(), "( >=bar/baz-1.23 set ) ");
}
f.add("foo/bar");
f.add("moo/oink");
+ f.add("settee");
+ f.add("couch");
{
SetSpecStringifier p;
f.contents()->accept(p);
- TEST_CHECK_STRINGIFY_EQUAL(p.s.str(), "( >=bar/baz-1.23 moo/oink ) ");
+ TEST_CHECK_STRINGIFY_EQUAL(p.s.str(), "( >=bar/baz-1.23 set moo/oink couch ) ");
}
f.rewrite();
@@ -160,16 +162,17 @@ namespace test_cases
std::ifstream ff("set_file_TEST_dir/paludisconf1");
TEST_CHECK(ff);
std::string g((std::istreambuf_iterator<char>(ff)), std::istreambuf_iterator<char>());
- TEST_CHECK_EQUAL(g, "# this is a comment\n\n? foo/bar\n* >=bar/baz-1.23\n\n# the end\n* moo/oink\n");
+ TEST_CHECK_EQUAL(g, "# this is a comment\n\n? foo/bar\n* >=bar/baz-1.23\n\n* set\n? settee\n\n# the end\n* moo/oink\n* couch\n");
}
f.remove(">=bar/baz-1.23");
f.remove("bar/cow");
+ f.remove("set");
{
SetSpecStringifier p;
f.contents()->accept(p);
- TEST_CHECK_STRINGIFY_EQUAL(p.s.str(), "( moo/oink ) ");
+ TEST_CHECK_STRINGIFY_EQUAL(p.s.str(), "( moo/oink couch ) ");
}
f.rewrite();
@@ -178,7 +181,7 @@ namespace test_cases
std::ifstream ff("set_file_TEST_dir/paludisconf1");
TEST_CHECK(ff);
std::string g((std::istreambuf_iterator<char>(ff)), std::istreambuf_iterator<char>());
- TEST_CHECK_EQUAL(g, "# this is a comment\n\n? foo/bar\n\n# the end\n* moo/oink\n");
+ TEST_CHECK_EQUAL(g, "# this is a comment\n\n? foo/bar\n\n? settee\n\n# the end\n* moo/oink\n* couch\n");
}
}
diff --git a/paludis/set_file_TEST_setup.sh b/paludis/set_file_TEST_setup.sh
index 3e2b7dc..aa86fc0 100755
--- a/paludis/set_file_TEST_setup.sh
+++ b/paludis/set_file_TEST_setup.sh
@@ -19,6 +19,9 @@ cat <<"END" > paludisconf1
? foo/bar
* >=bar/baz-1.23
+* set
+? settee
+
# the end
END