Adding test and update render to fix issue with rendering separator when headers are hidden fixing issue 1391.

This commit is contained in:
BlazeFace
2024-04-07 09:19:43 -07:00
committed by Patrik Svensson
parent eb38f76a6a
commit ff7282ecb8
3 changed files with 32 additions and 2 deletions

View File

@ -0,0 +1,7 @@
┌────────┬────────┐
│ Qux │ Corgi │
├────────┼────────┤
│ Waldo │ Grault │
├────────┼────────┤
│ Garply │ Fred │
└────────┴────────┘

View File

@ -159,6 +159,29 @@ public sealed class TableTests
return Verifier.Verify(console.Output);
}
[Fact]
[Expectation("Render_Row_Separators_No_Header")]
public Task Should_Render_Table_With_Row_Separators_No_Header_Correctly()
{
// Given
var console = new TestConsole();
var table = new Table();
table.ShowRowSeparators();
table.HideHeaders();
table.AddColumns("Foo", "Bar");
table.AddRow("Qux", "Corgi");
table.AddRow("Waldo", "Grault");
table.AddRow("Garply", "Fred");
// When
console.Write(table);
// Then
return Verifier.Verify(console.Output);
}
[Fact]
[Expectation("Render_EA_Character")]
public Task Should_Render_Table_With_EA_Character_Correctly()