Skip to content

Missing newline character at beginning of values #1143

@tom42

Description

@tom42

This class

public sealed class TestClass
{
    public string Property1 { get; set; } = "Text without newline character(s)";
    public string Property2 { get; set; } = "Text with\nnewline character(s)";
    public string Property3 { get; set; } = "\nText with\nnewline character(s)";
}

when run through through this test using Verify.Xunit 23.1.0 using default verifier settings:

[Fact]
public Task Test()
{
    return Verifier.Verify(new TestClass());
}

yields the following received file:

{
  Property1: Text without newline character(s),
  Property2:
Text with
newline character(s),
  Property3:
Text with
newline character(s)
}

The newline character at the beginning of strings matters to me, so I'd expect the received file to look like this:

{
  Property1: Text without newline character(s),
  Property2:
Text with
newline character(s),
  Property3:

Text with
newline character(s)
}

Am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions