BenchmarkDotNet icon indicating copy to clipboard operation
BenchmarkDotNet copied to clipboard

Trailing newline characters in input value break summary table

Open jhinder opened this issue 3 years ago • 0 comments

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

jhinder avatar Dec 10 '21 09:12 jhinder