diff --git a/test/integration/load_node_test.cpp b/test/integration/load_node_test.cpp index 49f2b61..3aef8f8 100644 --- a/test/integration/load_node_test.cpp +++ b/test/integration/load_node_test.cpp @@ -368,13 +368,18 @@ TEST(NodeTest, LoadCommaSeparatedStrings) { EXPECT_THROW(Load(R"(,foo)"), ParserException); } -TEST(NodeSpecTest, InfiniteLoopNodes) { +TEST(NodeTest, InfiniteLoopNodes) { // Until yaml-cpp <= 0.8.0 this caused an infinite loop; // After, it triggers an exception (but LoadAll is smart enough to avoid // the infinite loop in any case). EXPECT_THROW(LoadAll(R"(,)"), ParserException); } +TEST(NodeTest, MultipleDocuments) { + std::vector docs = LoadAll("\n---\n---\nA\n"); + EXPECT_EQ(docs.size(), 2); +} + struct NewLineStringsTestCase { std::string input; std::string expected_content;