Skip to content

Trailing newline characters in input value break summary table #1867

@jhinder

Description

@jhinder

Version: 0.13.1

When a parameterised input value has trailing newline characters, they are rendered in the summary table on the console, breaking the table.

public class Repro
{
    [ParamsSource(nameof(Data))]
    public string Input { get; set; }

    [Benchmark]
    public void A()
    {
        _ = Input.Length;
    }

    public static IEnumerable<string> Data()
    {
        yield return "Input without trailing newline character";
        yield return "Input with trailing newline characters\r\n";
    }
}

Screenshot of the console window (notice the line break in the first data row):
grafik

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions