mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-08 12:21:17 +00:00
Improve build and fix single cr on windows (#1099)
This commit is contained in:

committed by
GitHub

parent
7d06655611
commit
4c982d59dc
@@ -345,5 +345,20 @@ TEST(NodeTest, LoadTagWithNullScalar) {
|
||||
EXPECT_TRUE(node.IsNull());
|
||||
}
|
||||
|
||||
TEST(LoadNodeTest, BlockCRNLEncoded) {
|
||||
Node node = Load(
|
||||
"blockText: |\r\n"
|
||||
" some arbitrary text \r\n"
|
||||
" spanning some \r\n"
|
||||
" lines, that are split \r\n"
|
||||
" by CR and NL\r\n"
|
||||
"followup: 1");
|
||||
EXPECT_EQ(
|
||||
"some arbitrary text \nspanning some \nlines, that are split \nby CR and "
|
||||
"NL\n",
|
||||
node["blockText"].as<std::string>());
|
||||
EXPECT_EQ(1, node["followup"].as<int>());
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace YAML
|
||||
|
Reference in New Issue
Block a user