mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 08:50:25 +01:00
Preventing more Update execution before Initialize.
This commit is contained in:
@@ -3182,36 +3182,6 @@ e
|
||||
Assert.Equal (15, TextFormatter.GetMaxLengthForWidth (runes, 16));
|
||||
}
|
||||
|
||||
[Fact, AutoInitShutdown]
|
||||
public void GetMaxLengthForWidth_On_Button ()
|
||||
{
|
||||
var btn = new Button ("Say Hello 你") {
|
||||
X = Pos.Center (),
|
||||
Y = Pos.Center ()
|
||||
};
|
||||
var win = new Window ("Test Demo 你") {
|
||||
Width = Dim.Fill (),
|
||||
Height = Dim.Fill ()
|
||||
};
|
||||
win.Add (btn);
|
||||
Application.Top.Add (win);
|
||||
Application.Begin (Application.Top);
|
||||
((FakeDriver)Application.Driver).SetBufferSize (30, 5);
|
||||
|
||||
Assert.Equal (new Rect (0, 0, 16, 1), btn.Bounds);
|
||||
|
||||
var expected = @"
|
||||
┌ Test Demo 你 ──────────────┐
|
||||
│ │
|
||||
│ [ Say Hello 你 ] │
|
||||
│ │
|
||||
└────────────────────────────┘
|
||||
";
|
||||
|
||||
var pos = GraphViewTests.AssertDriverContentsWithFrameAre (expected, output);
|
||||
Assert.Equal (new Rect (0, 0, 30, 5), pos);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Format_Truncate_Simple_And_Wide_Runes ()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user