mirror of
https://github.com/SabreTools/SabreTools.CommandLine.git
synced 2026-07-21 08:05:52 +00:00
Simplify long description printing, add test
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Xunit;
|
||||
using System.Net.NetworkInformation;
|
||||
using Xunit;
|
||||
|
||||
namespace SabreTools.CommandLine.Test
|
||||
{
|
||||
@@ -90,6 +91,26 @@ namespace SabreTools.CommandLine.Test
|
||||
Assert.Empty(feature.Inputs);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void FormatLongDescriptionTest()
|
||||
{
|
||||
var feature = new MockFeature("a", "a", "a", "Some long description that is normal");
|
||||
var o = feature.FormatLongDescription(pre: 0);
|
||||
Assert.Equal(2, o.Count);
|
||||
|
||||
feature = new MockFeature("a", "a", "a", "Some long description\nwith a newline");
|
||||
o = feature.FormatLongDescription(pre: 0);
|
||||
Assert.Equal(3, o.Count);
|
||||
|
||||
feature = new MockFeature("a", "a", "a", "Some long description\nwith\nmultiple\nnewlines");
|
||||
o = feature.FormatLongDescription(pre: 0);
|
||||
Assert.Equal(5, o.Count);
|
||||
|
||||
feature = new MockFeature("a", "a", "a", "Some long description\n - With formatting");
|
||||
o = feature.FormatLongDescription(pre: 0);
|
||||
Assert.Equal(3, o.Count);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Mock Feature implementation for testing
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user