Fix reading empty token stack with a node with properties but no scalar.

E.g. `!2`.
This commit is contained in:
Jesse Beder
2020-01-20 18:05:15 -06:00
parent 3dca8668b1
commit c9460110e0
2 changed files with 11 additions and 0 deletions

View File

@@ -257,5 +257,10 @@ TEST(NodeTest, LoadTagWithParenthesis) {
EXPECT_EQ(node.as<std::string>(), "foo");
}
TEST(NodeTest, LoadTagWithNullScalar) {
Node node = Load("!2");
EXPECT_TRUE(node.IsNull());
}
} // namespace
} // namespace YAML