mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-17 00:38:08 +08:00
fix: change CRLF into LF before comparison
This commit is contained in:
@@ -17,7 +17,17 @@ BOOST_AUTO_TEST_CASE(test_example)
|
||||
std::ofstream ofs("tmp1.toml");
|
||||
ofs << data;
|
||||
}
|
||||
const auto serialized = toml::parse("tmp1.toml");
|
||||
|
||||
auto serialized = toml::parse("tmp1.toml");
|
||||
{
|
||||
auto& owner = toml::get<toml::table>(serialized.at("owner"));
|
||||
auto& bio = toml::get<std::string>(owner.at("bio"));
|
||||
const auto CR = std::find(bio.begin(), bio.end(), '\r');
|
||||
if(CR != bio.end())
|
||||
{
|
||||
bio.erase(CR);
|
||||
}
|
||||
}
|
||||
BOOST_CHECK(data == serialized);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user