mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Partial fix
This commit is contained in:
@@ -1855,11 +1855,6 @@ Y
|
||||
Application.Begin (top);
|
||||
((FakeDriver)Application.Driver).SetBufferSize (width + 2, 6);
|
||||
|
||||
Assert.True (lblLeft.TextFormatter.AutoSize == autoSize);
|
||||
Assert.True (lblCenter.TextFormatter.AutoSize == autoSize);
|
||||
Assert.True (lblRight.TextFormatter.AutoSize == autoSize);
|
||||
Assert.True (lblJust.TextFormatter.AutoSize == autoSize);
|
||||
|
||||
if (autoSize)
|
||||
{
|
||||
Size expectedSize = new (11, 1);
|
||||
@@ -1983,11 +1978,6 @@ Y
|
||||
Application.Begin (top);
|
||||
((FakeDriver)Application.Driver).SetBufferSize (9, height + 2);
|
||||
|
||||
Assert.True (lblLeft.TextFormatter.AutoSize == autoSize);
|
||||
Assert.True (lblCenter.TextFormatter.AutoSize == autoSize);
|
||||
Assert.True (lblRight.TextFormatter.AutoSize == autoSize);
|
||||
Assert.True (lblJust.TextFormatter.AutoSize == autoSize);
|
||||
|
||||
if (autoSize)
|
||||
{
|
||||
Assert.Equal (new (1, 11), lblLeft.TextFormatter.Size);
|
||||
|
||||
@@ -130,6 +130,26 @@ public class TextTests (ITestOutputHelper output)
|
||||
Assert.Equal (new Rectangle (0, 0, 5, 1), view.Viewport);
|
||||
}
|
||||
|
||||
// BUGBUG: this is a temporary test that helped identify #3469 - It needs to be expanded upon (and renamed)
|
||||
[Fact]
|
||||
public void TextDirection_Horizontal_Dims_Correct_WidthAbsolute ()
|
||||
{
|
||||
var view = new View
|
||||
{
|
||||
Text = "01234",
|
||||
TextDirection = TextDirection.LeftRight_TopBottom,
|
||||
TextAlignment = Alignment.Centered,
|
||||
Width = 10,
|
||||
Height = Dim.Auto (Dim.DimAutoStyle.Text)
|
||||
};
|
||||
view.BeginInit ();
|
||||
view.EndInit ();
|
||||
Assert.Equal (new Rectangle (0, 0, 10, 1), view.Frame);
|
||||
Assert.Equal (new Rectangle (0, 0, 10, 1), view.Viewport);
|
||||
|
||||
Assert.Equal (new (10, 1), view.TextFormatter.Size);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TextDirection_Vertical_Dims_Correct ()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user