Fixed Dialog tests and Text tess

This commit is contained in:
Tigger Kindel
2023-03-28 08:23:58 -06:00
parent a312b2ad87
commit 689b7523f1
11 changed files with 666 additions and 88 deletions

View File

@@ -3462,7 +3462,7 @@ This TextFormatter (tf2) is rewritten.
Height = 1,
Text = text
};
var win = new Window ("Window") {
var win = new Window () {
Width = Dim.Fill (),
Height = Dim.Fill ()
};
@@ -3479,7 +3479,7 @@ This TextFormatter (tf2) is rewritten.
Assert.Equal (new Rect (0, 0, 10, 4), win.Frame);
Assert.Equal (new Rect (0, 0, 10, 4), Application.Top.Frame);
var expected = @"
┤Wind├──┐
────────┐
│Vie │
│ │
└────────┘
@@ -3515,7 +3515,7 @@ This TextFormatter (tf2) is rewritten.
Width = Dim.Fill () - text.Length,
Text = text
};
var win = new Window ("Window") {
var win = new Window () {
Width = Dim.Fill (),
Height = Dim.Fill ()
};
@@ -3532,7 +3532,7 @@ This TextFormatter (tf2) is rewritten.
Assert.Equal (new Rect (0, 0, 10, 4), win.Frame);
Assert.Equal (new Rect (0, 0, 10, 4), Application.Top.Frame);
var expected = @"
┤Wind├──┐
────────┐
│Vie │
│ │
└────────┘
@@ -3551,7 +3551,7 @@ This TextFormatter (tf2) is rewritten.
var exception = Record.Exception (() => Assert.Equal (new List<ustring> () { ustring.Empty }, view.TextFormatter.Lines));
Assert.Null (exception);
expected = @"
┤Wind├──┐
────────┐
│ │
│ │
└────────┘
@@ -3570,7 +3570,7 @@ This TextFormatter (tf2) is rewritten.
Height = 1,
Text = text
};
var win = new Window ("Window") {
var win = new Window () {
Width = Dim.Fill (),
Height = Dim.Fill ()
};
@@ -3587,7 +3587,7 @@ This TextFormatter (tf2) is rewritten.
Assert.Equal (new Rect (0, 0, 10, 4), win.Frame);
Assert.Equal (new Rect (0, 0, 10, 4), Application.Top.Frame);
var expected = @"
┤Wind├──┐
────────┐
│Label │
│ │
└────────┘
@@ -3606,7 +3606,7 @@ This TextFormatter (tf2) is rewritten.
Assert.Equal (new Size (5, 1), label.TextFormatter.Size);
Assert.Single (label.TextFormatter.Lines);
expected = @"
┤Wind├──┐
────────┐
│Label │
│ │
└────────┘
@@ -3626,7 +3626,7 @@ This TextFormatter (tf2) is rewritten.
Text = text,
AutoSize = false
};
var win = new Window ("Window") {
var win = new Window () {
Width = Dim.Fill (),
Height = Dim.Fill ()
};
@@ -3643,7 +3643,7 @@ This TextFormatter (tf2) is rewritten.
Assert.Equal (new Rect (0, 0, 10, 4), win.Frame);
Assert.Equal (new Rect (0, 0, 10, 4), Application.Top.Frame);
var expected = @"
┤Wind├──┐
────────┐
│Lab │
│ │
└────────┘
@@ -3662,7 +3662,7 @@ This TextFormatter (tf2) is rewritten.
Assert.Equal (new Size (0, 1), label.TextFormatter.Size);
Assert.Equal (new List<ustring> { ustring.Empty }, label.TextFormatter.Lines);
expected = @"
┤Wind├──┐
────────┐
│ │
│ │
└────────┘
@@ -3680,7 +3680,7 @@ This TextFormatter (tf2) is rewritten.
Width = Dim.Fill () - text.Length,
Text = text
};
var win = new Window ("Window") {
var win = new Window () {
Width = Dim.Fill (),
Height = Dim.Fill ()
};
@@ -3697,7 +3697,7 @@ This TextFormatter (tf2) is rewritten.
Assert.Equal (new Rect (0, 0, 10, 4), win.Frame);
Assert.Equal (new Rect (0, 0, 10, 4), Application.Top.Frame);
var expected = @"
┤Wind├──┐
────────┐
│Label │
│ │
└────────┘
@@ -3716,7 +3716,7 @@ This TextFormatter (tf2) is rewritten.
var exception = Record.Exception (() => Assert.Single (label.TextFormatter.Lines));
Assert.Null (exception);
expected = @"
┤Wind├──┐
────────┐
│Label │
│ │
└────────┘
@@ -3735,7 +3735,7 @@ This TextFormatter (tf2) is rewritten.
Text = text,
AutoSize = false
};
var win = new Window ("Window") {
var win = new Window () {
Width = Dim.Fill (),
Height = Dim.Fill ()
};
@@ -3752,7 +3752,7 @@ This TextFormatter (tf2) is rewritten.
Assert.Equal (new Rect (0, 0, 10, 4), win.Frame);
Assert.Equal (new Rect (0, 0, 10, 4), Application.Top.Frame);
var expected = @"
┤Wind├──┐
────────┐
│Lab │
│ │
└────────┘
@@ -3771,7 +3771,7 @@ This TextFormatter (tf2) is rewritten.
var exception = Record.Exception (() => Assert.Equal (new List<ustring> () { ustring.Empty }, label.TextFormatter.Lines));
Assert.Null (exception);
expected = @"
┤Wind├──┐
────────┐
│ │
│ │
└────────┘
@@ -3791,7 +3791,7 @@ This TextFormatter (tf2) is rewritten.
Text = text,
AutoSize = true
};
var win = new Window ("Window") {
var win = new Window () {
Width = Dim.Fill (),
Height = Dim.Fill ()
};
@@ -3858,7 +3858,7 @@ This TextFormatter (tf2) is rewritten.
Height = Dim.Fill () - text.Length,
Text = text
};
var win = new Window ("Window") {
var win = new Window () {
Width = Dim.Fill (),
Height = Dim.Fill ()
};
@@ -3926,7 +3926,7 @@ This TextFormatter (tf2) is rewritten.
Text = text,
AutoSize = true
};
var win = new Window ("Window") {
var win = new Window () {
Width = Dim.Fill (),
Height = Dim.Fill ()
};
@@ -3993,7 +3993,7 @@ This TextFormatter (tf2) is rewritten.
Height = Dim.Fill () - text.Length,
Text = text
};
var win = new Window ("Window") {
var win = new Window () {
Width = Dim.Fill (),
Height = Dim.Fill ()
};