mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 04:41:16 +00:00
Fix formatting when writing " as a character.
This commit is contained in:
@@ -962,6 +962,14 @@ TEST_F(EmitterTest, QuoteNull) {
|
||||
ExpectEmit("\"null\"");
|
||||
}
|
||||
|
||||
TEST_F(EmitterTest, ValueOfDoubleQuote) {
|
||||
out << YAML::BeginMap;
|
||||
out << YAML::Key << "foo" << YAML::Value << '"';
|
||||
out << YAML::EndMap;
|
||||
|
||||
ExpectEmit("foo: \"\\\"\"");
|
||||
}
|
||||
|
||||
class EmitterErrorTest : public ::testing::Test {
|
||||
protected:
|
||||
void ExpectEmitError(const std::string& expectedError) {
|
||||
|
Reference in New Issue
Block a user