mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 16:59:35 +01:00
Add tests for insert middle and end
This commit is contained in:
@@ -396,6 +396,44 @@ namespace UnitTests {
|
||||
@"
|
||||
┌──┬───┬──┐
|
||||
│ │111│22│
|
||||
└──┴───┴──┘";
|
||||
TestHelpers.AssertDriverContentsAre (looksLike, output);
|
||||
}
|
||||
|
||||
[Fact, AutoInitShutdown]
|
||||
public void TestSplitView_InsertPanelMiddle()
|
||||
{
|
||||
var splitContainer = Get11By3SplitView (out var line, true);
|
||||
SetInputFocusLine (splitContainer);
|
||||
|
||||
splitContainer.InsertTile (1);
|
||||
|
||||
splitContainer.Redraw (splitContainer.Bounds);
|
||||
|
||||
// so should ignore the 2 distance and stick to 6
|
||||
string looksLike =
|
||||
@"
|
||||
┌──┬───┬──┐
|
||||
│11│ │22│
|
||||
└──┴───┴──┘";
|
||||
TestHelpers.AssertDriverContentsAre (looksLike, output);
|
||||
}
|
||||
|
||||
[Fact, AutoInitShutdown]
|
||||
public void TestSplitView_InsertPanelAtEnd ()
|
||||
{
|
||||
var splitContainer = Get11By3SplitView (out var line, true);
|
||||
SetInputFocusLine (splitContainer);
|
||||
|
||||
splitContainer.InsertTile (2);
|
||||
|
||||
splitContainer.Redraw (splitContainer.Bounds);
|
||||
|
||||
// so should ignore the 2 distance and stick to 6
|
||||
string looksLike =
|
||||
@"
|
||||
┌──┬───┬──┐
|
||||
│11│222│ │
|
||||
└──┴───┴──┘";
|
||||
TestHelpers.AssertDriverContentsAre (looksLike, output);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user