mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 16:59:35 +01:00
Fix suggestion overspill bounds
This commit is contained in:
@@ -102,6 +102,21 @@ namespace Terminal.Gui.ViewTests {
|
||||
}
|
||||
|
||||
|
||||
[Theory, AutoInitShutdown]
|
||||
[InlineData("ffffffffffffffffffffffffff","ffffffffff")]
|
||||
[InlineData("fffffffffff","ffffffffff")]
|
||||
public void TestAutoAppendRendering_ShouldNotOverspill(string overspillUsing,string expectRender)
|
||||
{
|
||||
var tf = GetTextFieldsInViewSuggesting(overspillUsing);
|
||||
|
||||
// f is typed we should only see 'f' up to size of View (10)
|
||||
Application.Driver.SendKeys('f',ConsoleKey.F,false,false,false);
|
||||
tf.Redraw(tf.Bounds);
|
||||
TestHelpers.AssertDriverContentsAre(expectRender,output);
|
||||
Assert.Equal("f",tf.Text.ToString());
|
||||
}
|
||||
|
||||
|
||||
[Theory, AutoInitShutdown]
|
||||
[InlineData(ConsoleKey.UpArrow)]
|
||||
[InlineData(ConsoleKey.DownArrow)]
|
||||
|
||||
Reference in New Issue
Block a user