From 425ba572b1a4c0e2bf9f0af63c92482a6574365a Mon Sep 17 00:00:00 2001 From: Jacob Faulks Date: Fri, 6 Sep 2024 09:58:56 -0500 Subject: [PATCH] failed test --- YamlDotNet.Test/Core/EmitterTests.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/YamlDotNet.Test/Core/EmitterTests.cs b/YamlDotNet.Test/Core/EmitterTests.cs index aa7fe34c7..66c3b52ba 100644 --- a/YamlDotNet.Test/Core/EmitterTests.cs +++ b/YamlDotNet.Test/Core/EmitterTests.cs @@ -443,6 +443,15 @@ public void SingleQuotesAreNotDoubleQuotedUnlessNecessary(string input) yaml.Should().NotContain("\""); } + [Theory] + [InlineData(@"\hello world")] + public void LeadingBackslashIsNotQuotedUnlessNecessary(string input) + { + var events = StreamOf(DocumentWith(new Scalar(input))); + var yaml = EmittedTextFrom(events); + yaml.Should().NotContain("\'"); + } + private string Lines(params string[] lines) { return string.Join(Environment.NewLine, lines);