|
@@ -3366,7 +3366,7 @@ ssb
|
|
[InlineData ("A", 0, true, "")]
|
|
[InlineData ("A", 0, true, "")]
|
|
[InlineData ("A", 1, true, "A")]
|
|
[InlineData ("A", 1, true, "A")]
|
|
[InlineData ("A", 2, true, " A")]
|
|
[InlineData ("A", 2, true, " A")]
|
|
- [InlineData ("AB", 1, true, "")] // BUGBUG: This is wrong, it should be "A"
|
|
|
|
|
|
+ [InlineData ("AB", 1, true, "B")]
|
|
[InlineData ("AB", 2, true, "AB")]
|
|
[InlineData ("AB", 2, true, "AB")]
|
|
[InlineData ("ABC", 3, true, "ABC")]
|
|
[InlineData ("ABC", 3, true, "ABC")]
|
|
[InlineData ("ABC", 4, true, " ABC")]
|
|
[InlineData ("ABC", 4, true, " ABC")]
|
|
@@ -3476,4 +3476,30 @@ ssb
|
|
|
|
|
|
TestHelpers.AssertDriverContentsWithFrameAre (expectedText, _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre (expectedText, _output);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ [SetupFakeDriver]
|
|
|
|
+ [Theory]
|
|
|
|
+ [InlineData ("A", 2, false, "A")]
|
|
|
|
+ [InlineData ("AB12", 5, false, "AB12")]
|
|
|
|
+ [InlineData ("AB\n12", 5, false, "A1\nB2")]
|
|
|
|
+ [InlineData ("デモエ", 1, false, "")]
|
|
|
|
+
|
|
|
|
+ public void Draw_Vertical_TopBottom_LeftRight (string text, int width, bool autoSize, string expectedText)
|
|
|
|
+ {
|
|
|
|
+ TextFormatter tf = new ()
|
|
|
|
+ {
|
|
|
|
+ Text = text,
|
|
|
|
+ AutoSize = autoSize,
|
|
|
|
+ Direction = TextDirection.TopBottom_LeftRight,
|
|
|
|
+ VerticalAlignment = VerticalTextAlignment.Top
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ if (!autoSize)
|
|
|
|
+ {
|
|
|
|
+ tf.Size = new Size (width, 1);
|
|
|
|
+ }
|
|
|
|
+ tf.Draw (new Rectangle (0, 0, width, 5), Attribute.Default, Attribute.Default);
|
|
|
|
+
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre (expectedText, _output);
|
|
|
|
+ }
|
|
}
|
|
}
|