|
@@ -419,7 +419,6 @@ ssb
|
|
new Attribute (ColorName.White, ColorName.Black),
|
|
new Attribute (ColorName.White, ColorName.Black),
|
|
new Attribute (ColorName.Blue, ColorName.Black),
|
|
new Attribute (ColorName.Blue, ColorName.Black),
|
|
default (Rect),
|
|
default (Rect),
|
|
- true,
|
|
|
|
driver
|
|
driver
|
|
);
|
|
);
|
|
TestHelpers.AssertDriverContentsWithFrameAre (expected, _output, driver);
|
|
TestHelpers.AssertDriverContentsWithFrameAre (expected, _output, driver);
|
|
@@ -427,6 +426,61 @@ ssb
|
|
driver.End ();
|
|
driver.End ();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ [Fact]
|
|
|
|
+ [SetupFakeDriver]
|
|
|
|
+ public void FillRemaining_True_False ()
|
|
|
|
+ {
|
|
|
|
+ ((FakeDriver)Application.Driver).SetBufferSize (22, 5);
|
|
|
|
+
|
|
|
|
+ Attribute [] attrs =
|
|
|
|
+ {
|
|
|
|
+ Attribute.Default, new Attribute (ColorName.Green, ColorName.BrightMagenta),
|
|
|
|
+ new Attribute (ColorName.Blue, ColorName.Cyan)
|
|
|
|
+ };
|
|
|
|
+ var tf = new TextFormatter { Size = new Size (14, 3), Text = "Test\nTest long\nTest long long\n", MultiLine = true };
|
|
|
|
+
|
|
|
|
+ tf.Draw (
|
|
|
|
+ new Rect (1, 1, 19, 3),
|
|
|
|
+ attrs [1],
|
|
|
|
+ attrs [2]);
|
|
|
|
+
|
|
|
|
+ Assert.False (tf.FillRemaining);
|
|
|
|
+
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre (
|
|
|
|
+ @"
|
|
|
|
+ Test
|
|
|
|
+ Test long
|
|
|
|
+ Test long long",
|
|
|
|
+ _output);
|
|
|
|
+
|
|
|
|
+ TestHelpers.AssertDriverAttributesAre (
|
|
|
|
+ @"
|
|
|
|
+000000000000000000000
|
|
|
|
+011110000000000000000
|
|
|
|
+011111111100000000000
|
|
|
|
+011111111111111000000
|
|
|
|
+000000000000000000000",
|
|
|
|
+ null,
|
|
|
|
+ attrs);
|
|
|
|
+
|
|
|
|
+ tf.FillRemaining = true;
|
|
|
|
+
|
|
|
|
+ tf.Draw (
|
|
|
|
+ new Rect (1, 1, 19, 3),
|
|
|
|
+ attrs [1],
|
|
|
|
+ attrs [2]);
|
|
|
|
+
|
|
|
|
+ TestHelpers.AssertDriverAttributesAre (
|
|
|
|
+ @"
|
|
|
|
+000000000000000000000
|
|
|
|
+011111111111111111110
|
|
|
|
+011111111111111111110
|
|
|
|
+011111111111111111110
|
|
|
|
+000000000000000000000",
|
|
|
|
+ null,
|
|
|
|
+ attrs);
|
|
|
|
+ }
|
|
|
|
+
|
|
[Theory]
|
|
[Theory]
|
|
[InlineData ("_k Before", true, 0, (KeyCode)'K')] // lower case should return uppercase Hotkey
|
|
[InlineData ("_k Before", true, 0, (KeyCode)'K')] // lower case should return uppercase Hotkey
|
|
[InlineData ("a_k Second", true, 1, (KeyCode)'K')]
|
|
[InlineData ("a_k Second", true, 1, (KeyCode)'K')]
|
|
@@ -2010,7 +2064,6 @@ ssb
|
|
new Attribute (ColorName.White, ColorName.Black),
|
|
new Attribute (ColorName.White, ColorName.Black),
|
|
new Attribute (ColorName.Blue, ColorName.Black),
|
|
new Attribute (ColorName.Blue, ColorName.Black),
|
|
default (Rect),
|
|
default (Rect),
|
|
- true,
|
|
|
|
driver
|
|
driver
|
|
);
|
|
);
|
|
TestHelpers.AssertDriverContentsWithFrameAre (expected, _output, driver);
|
|
TestHelpers.AssertDriverContentsWithFrameAre (expected, _output, driver);
|
|
@@ -2049,7 +2102,6 @@ ssb
|
|
new Attribute (ColorName.White, ColorName.Black),
|
|
new Attribute (ColorName.White, ColorName.Black),
|
|
new Attribute (ColorName.Blue, ColorName.Black),
|
|
new Attribute (ColorName.Blue, ColorName.Black),
|
|
default (Rect),
|
|
default (Rect),
|
|
- true,
|
|
|
|
driver
|
|
driver
|
|
);
|
|
);
|
|
TestHelpers.AssertDriverContentsWithFrameAre (expected, _output, driver);
|
|
TestHelpers.AssertDriverContentsWithFrameAre (expected, _output, driver);
|
|
@@ -2088,7 +2140,6 @@ ssb
|
|
new Attribute (ColorName.White, ColorName.Black),
|
|
new Attribute (ColorName.White, ColorName.Black),
|
|
new Attribute (ColorName.Blue, ColorName.Black),
|
|
new Attribute (ColorName.Blue, ColorName.Black),
|
|
default (Rect),
|
|
default (Rect),
|
|
- true,
|
|
|
|
driver
|
|
driver
|
|
);
|
|
);
|
|
TestHelpers.AssertDriverContentsWithFrameAre (expected, _output, driver);
|
|
TestHelpers.AssertDriverContentsWithFrameAre (expected, _output, driver);
|