aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-06-17 18:43:40 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-06-17 18:43:40 +0100
commit018c963f0ea76a9bdd4f36b31f620ff520e66eb3 (patch)
tree38761791ee64399d62298bbb3244824603a3b3ad
parentcb60c95d527c19246454945e3f35af9fa3425b13 (diff)
downloadpaludis-018c963f0ea76a9bdd4f36b31f620ff520e66eb3.tar.gz
paludis-018c963f0ea76a9bdd4f36b31f620ff520e66eb3.tar.xz
Test for missing eol
-rw-r--r--paludis/util/config_file_TEST.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/paludis/util/config_file_TEST.cc b/paludis/util/config_file_TEST.cc
index 2034311..ed53efb 100644
--- a/paludis/util/config_file_TEST.cc
+++ b/paludis/util/config_file_TEST.cc
@@ -470,5 +470,13 @@ TEST(KeyValueConfigFile, AnnoyingLibtoolQuotes)
ASSERT_EQ(2, std::distance(ff.begin(), ff.end()));
EXPECT_EQ("foo 'bar' baz", ff.get("x"));
EXPECT_EQ("z", ff.get("y"));
+
+ std::stringstream s3;
+ s3 << "x='foo 'bar' baz'" << std::endl;
+ KeyValueConfigFile f3(s3, { kvcfo_ignore_single_quotes_inside_strings },
+ &KeyValueConfigFile::no_defaults, &KeyValueConfigFile::no_transformation);
+
+ ASSERT_EQ(1, std::distance(f3.begin(), f3.end()));
+ EXPECT_EQ("foo 'bar' baz", ff.get("x"));
}