mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Merged bdisp test improvemnts
This commit is contained in:
@@ -4082,6 +4082,75 @@ B")]
|
||||
|
||||
[SetupFakeDriver]
|
||||
[Theory]
|
||||
|
||||
// LeftRight_TopBottom
|
||||
[InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.LeftRight_TopBottom, @"
|
||||
0 2 4**
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******")]
|
||||
[InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Top, TextDirection.LeftRight_TopBottom, @"
|
||||
**0 2 4
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******")]
|
||||
[InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Top, TextDirection.LeftRight_TopBottom, @"
|
||||
*0 2 4*
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******")]
|
||||
[InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Top, TextDirection.LeftRight_TopBottom, @"
|
||||
0 2 4
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******")]
|
||||
|
||||
[InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.LeftRight_TopBottom, @"
|
||||
0 你 4*
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******")]
|
||||
[InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Top, TextDirection.LeftRight_TopBottom, @"
|
||||
*0 你 4
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******")]
|
||||
[InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Top, TextDirection.LeftRight_TopBottom, @"
|
||||
0 你 4*
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******")]
|
||||
[InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Top, TextDirection.LeftRight_TopBottom, @"
|
||||
0 你 4
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******")]
|
||||
|
||||
// LeftRight_BottomTop
|
||||
[InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.LeftRight_BottomTop, @"
|
||||
0 2 4**
|
||||
*******
|
||||
@@ -4148,6 +4217,208 @@ B")]
|
||||
*******
|
||||
*******")]
|
||||
|
||||
// RightLeft_TopBottom
|
||||
[InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.RightLeft_TopBottom, @"
|
||||
4 2 0**
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******")]
|
||||
[InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Top, TextDirection.RightLeft_TopBottom, @"
|
||||
**4 2 0
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******")]
|
||||
[InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Top, TextDirection.RightLeft_TopBottom, @"
|
||||
*4 2 0*
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******")]
|
||||
[InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Top, TextDirection.RightLeft_TopBottom, @"
|
||||
4 2 0
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******")]
|
||||
|
||||
[InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.RightLeft_TopBottom, @"
|
||||
4 你 0*
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******")]
|
||||
[InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Top, TextDirection.RightLeft_TopBottom, @"
|
||||
*4 你 0
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******")]
|
||||
[InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Top, TextDirection.RightLeft_TopBottom, @"
|
||||
4 你 0*
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******")]
|
||||
[InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Top, TextDirection.RightLeft_TopBottom, @"
|
||||
4 你 0
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******")]
|
||||
|
||||
// RightLeft_BottomTop
|
||||
[InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.RightLeft_BottomTop, @"
|
||||
4 2 0**
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******")]
|
||||
[InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Top, TextDirection.RightLeft_BottomTop, @"
|
||||
**4 2 0
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******")]
|
||||
[InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Top, TextDirection.RightLeft_BottomTop, @"
|
||||
*4 2 0*
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******")]
|
||||
[InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Top, TextDirection.RightLeft_BottomTop, @"
|
||||
4 2 0
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******")]
|
||||
|
||||
[InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.RightLeft_BottomTop, @"
|
||||
4 你 0*
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******")]
|
||||
[InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Top, TextDirection.RightLeft_BottomTop, @"
|
||||
*4 你 0
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******")]
|
||||
[InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Top, TextDirection.RightLeft_BottomTop, @"
|
||||
4 你 0*
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******")]
|
||||
[InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Top, TextDirection.RightLeft_BottomTop, @"
|
||||
4 你 0
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******
|
||||
*******")]
|
||||
|
||||
// TopBottom_LeftRight
|
||||
[InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.TopBottom_LeftRight, @"
|
||||
0******
|
||||
******
|
||||
2******
|
||||
******
|
||||
4******
|
||||
*******
|
||||
*******")]
|
||||
[InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Bottom, TextDirection.TopBottom_LeftRight, @"
|
||||
*******
|
||||
*******
|
||||
0******
|
||||
******
|
||||
2******
|
||||
******
|
||||
4******")]
|
||||
[InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Middle, TextDirection.TopBottom_LeftRight, @"
|
||||
*******
|
||||
0******
|
||||
******
|
||||
2******
|
||||
******
|
||||
4******
|
||||
*******")]
|
||||
[InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Justified, TextDirection.TopBottom_LeftRight, @"
|
||||
0******
|
||||
******
|
||||
******
|
||||
2******
|
||||
******
|
||||
******
|
||||
4******")]
|
||||
|
||||
[InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.TopBottom_LeftRight, @"
|
||||
0******
|
||||
******
|
||||
你*****
|
||||
******
|
||||
4******
|
||||
*******
|
||||
*******")]
|
||||
[InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Bottom, TextDirection.TopBottom_LeftRight, @"
|
||||
*******
|
||||
*******
|
||||
0******
|
||||
******
|
||||
你*****
|
||||
******
|
||||
4******")]
|
||||
[InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Middle, TextDirection.TopBottom_LeftRight, @"
|
||||
*******
|
||||
0******
|
||||
******
|
||||
你*****
|
||||
******
|
||||
4******
|
||||
*******")]
|
||||
[InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Justified, TextDirection.TopBottom_LeftRight, @"
|
||||
0******
|
||||
******
|
||||
******
|
||||
你*****
|
||||
******
|
||||
******
|
||||
4******")]
|
||||
|
||||
// TopBottom_RightLeft
|
||||
[InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.TopBottom_RightLeft, @"
|
||||
0******
|
||||
******
|
||||
@@ -4224,6 +4495,140 @@ B")]
|
||||
***** *
|
||||
*****4*
|
||||
*******")]
|
||||
|
||||
// BottomTop_LeftRight
|
||||
[InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.BottomTop_LeftRight, @"
|
||||
4******
|
||||
******
|
||||
2******
|
||||
******
|
||||
0******
|
||||
*******
|
||||
*******")]
|
||||
[InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Bottom, TextDirection.BottomTop_LeftRight, @"
|
||||
*******
|
||||
*******
|
||||
4******
|
||||
******
|
||||
2******
|
||||
******
|
||||
0******")]
|
||||
[InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Middle, TextDirection.BottomTop_LeftRight, @"
|
||||
*******
|
||||
4******
|
||||
******
|
||||
2******
|
||||
******
|
||||
0******
|
||||
*******")]
|
||||
[InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Justified, TextDirection.BottomTop_LeftRight, @"
|
||||
4******
|
||||
******
|
||||
******
|
||||
2******
|
||||
******
|
||||
******
|
||||
0******")]
|
||||
|
||||
[InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.BottomTop_LeftRight, @"
|
||||
4******
|
||||
******
|
||||
你*****
|
||||
******
|
||||
0******
|
||||
*******
|
||||
*******")]
|
||||
[InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Bottom, TextDirection.BottomTop_LeftRight, @"
|
||||
*******
|
||||
*******
|
||||
4******
|
||||
******
|
||||
你*****
|
||||
******
|
||||
0******")]
|
||||
[InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Middle, TextDirection.BottomTop_LeftRight, @"
|
||||
*******
|
||||
4******
|
||||
******
|
||||
你*****
|
||||
******
|
||||
0******
|
||||
*******")]
|
||||
[InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Justified, TextDirection.BottomTop_LeftRight, @"
|
||||
4******
|
||||
******
|
||||
******
|
||||
你*****
|
||||
******
|
||||
******
|
||||
0******")]
|
||||
|
||||
// BottomTop_RightLeft
|
||||
[InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.BottomTop_RightLeft, @"
|
||||
4******
|
||||
******
|
||||
2******
|
||||
******
|
||||
0******
|
||||
*******
|
||||
*******")]
|
||||
[InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Bottom, TextDirection.BottomTop_RightLeft, @"
|
||||
*******
|
||||
*******
|
||||
4******
|
||||
******
|
||||
2******
|
||||
******
|
||||
0******")]
|
||||
[InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Middle, TextDirection.BottomTop_RightLeft, @"
|
||||
*******
|
||||
4******
|
||||
******
|
||||
2******
|
||||
******
|
||||
0******
|
||||
*******")]
|
||||
[InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Justified, TextDirection.BottomTop_RightLeft, @"
|
||||
4******
|
||||
******
|
||||
******
|
||||
2******
|
||||
******
|
||||
******
|
||||
0******")]
|
||||
|
||||
[InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.BottomTop_RightLeft, @"
|
||||
4******
|
||||
******
|
||||
你*****
|
||||
******
|
||||
0******
|
||||
*******
|
||||
*******")]
|
||||
[InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Bottom, TextDirection.BottomTop_RightLeft, @"
|
||||
*******
|
||||
*******
|
||||
4******
|
||||
******
|
||||
你*****
|
||||
******
|
||||
0******")]
|
||||
[InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Middle, TextDirection.BottomTop_RightLeft, @"
|
||||
*******
|
||||
4******
|
||||
******
|
||||
你*****
|
||||
******
|
||||
0******
|
||||
*******")]
|
||||
[InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Justified, TextDirection.BottomTop_RightLeft, @"
|
||||
4******
|
||||
******
|
||||
******
|
||||
你*****
|
||||
******
|
||||
******
|
||||
0******")]
|
||||
public void Draw_Text_Alignment (string text, TextAlignment horizontalTextAlignment, VerticalTextAlignment verticalTextAlignment, TextDirection textDirection, string expectedText)
|
||||
{
|
||||
TextFormatter tf = new ()
|
||||
|
||||
Reference in New Issue
Block a user