mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-07-05 12:08:16 +08:00
Pipe character for listing options - Fully implemented and tested.
This commit is contained in:

committed by
Patrik Svensson

parent
e66d3aab2e
commit
43f9ae92ad
@ -23,14 +23,16 @@ public sealed partial class CommandOptionAttributeTests
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("<VALUE>")]
|
||||
public void Should_Parse_Value_Correctly(string value)
|
||||
[InlineData("<VALUE>", "VALUE")]
|
||||
[InlineData("<VALUE1>", "VALUE1")]
|
||||
[InlineData("<VALUE1|VALUE2>", "VALUE1|VALUE2")]
|
||||
public void Should_Parse_Value_Correctly(string value, string expected)
|
||||
{
|
||||
// Given, When
|
||||
var option = new CommandOptionAttribute($"-o|--option {value}");
|
||||
|
||||
// Then
|
||||
option.ValueName.ShouldBe("VALUE");
|
||||
option.ValueName.ShouldBe(expected);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
Reference in New Issue
Block a user