Add dedicated test for values with spaces

CC @azubieta
This commit is contained in:
TheAssassin
2018-11-09 21:28:16 +01:00
parent 574a883733
commit a87fd648e0

View File

@@ -187,3 +187,16 @@ TEST_F(DesktopFileReaderFixture, testDataGetter) {
EXPECT_EQ(data["Desktop File"], expected);
}
TEST_F(DesktopFileReaderFixture, testParseLinesWithMultipleSpaces) {
std::stringstream ss;
ss << "[Desktop File]" << std::endl
<< "Name= What a great name " << std::endl;
DesktopFileReader reader(ss);
auto section = reader["Desktop File"];
EXPECT_FALSE(section.empty());
EXPECT_EQ(section["Name"].value(), "What a great name");
}