mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-12-30 04:15:49 +08:00
Add support for markup text in panel header
This commit is contained in:
committed by
Patrik Svensson
parent
be3350a411
commit
b1da5e7ba8
@@ -19,6 +19,34 @@ namespace Spectre.Console.Tests.Unit
|
||||
console.Lines[0].ShouldBe("────────────────────────────────────────");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Should_Render_Default_Rule_With_Specified_Box()
|
||||
{
|
||||
// Given
|
||||
var console = new PlainConsole(width: 40);
|
||||
|
||||
// When
|
||||
console.Render(new Rule().DoubleBorder());
|
||||
|
||||
// Then
|
||||
console.Lines.Count.ShouldBe(1);
|
||||
console.Lines[0].ShouldBe("════════════════════════════════════════");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Should_Render_With_Specified_Box()
|
||||
{
|
||||
// Given
|
||||
var console = new PlainConsole(width: 40);
|
||||
|
||||
// When
|
||||
console.Render(new Rule("Hello World").DoubleBorder());
|
||||
|
||||
// Then
|
||||
console.Lines.Count.ShouldBe(1);
|
||||
console.Lines[0].ShouldBe("═════════════ Hello World ══════════════");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Should_Render_Default_Rule_With_Title_Centered_By_Default()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user