mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-19 13:28:16 +08:00
Adding test and update render to fix issue with rendering separator when headers are hidden fixing issue 1391.
This commit is contained in:

committed by
Patrik Svensson

parent
eb38f76a6a
commit
ff7282ecb8
@ -0,0 +1,7 @@
|
||||
┌────────┬────────┐
|
||||
│ Qux │ Corgi │
|
||||
├────────┼────────┤
|
||||
│ Waldo │ Grault │
|
||||
├────────┼────────┤
|
||||
│ Garply │ Fred │
|
||||
└────────┴────────┘
|
@ -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()
|
||||
|
Reference in New Issue
Block a user