mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-08 12:21:17 +00:00
ensuring local tags are retained after loading a node + test
This commit is contained in:
@@ -629,6 +629,17 @@ TEST_F(EmitterTest, LocalTagWithScalar) {
|
||||
ExpectEmit("!foo bar");
|
||||
}
|
||||
|
||||
TEST_F(EmitterTest, LocalTagRetainedAfterLoadingNode) {
|
||||
Node n = Node("hello");
|
||||
out << LocalTag("foo") << n;
|
||||
std::string expected = "!foo hello";
|
||||
ExpectEmit(expected);
|
||||
Node yamlNode = Load(out.c_str());
|
||||
Emitter emitter;
|
||||
emitter << yamlNode;
|
||||
EXPECT_EQ(expected, emitter.c_str());
|
||||
}
|
||||
|
||||
TEST_F(EmitterTest, ComplexDoc) {
|
||||
out << BeginMap;
|
||||
out << Key << "receipt";
|
||||
|
Reference in New Issue
Block a user