mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-07-01 18:38:16 +08:00
Unit test to reproduce the -v/--version bug
This commit is contained in:

committed by
Patrik Svensson

parent
5a52c1f277
commit
d03c10623c
@ -0,0 +1,18 @@
|
||||
namespace Spectre.Console.Tests.Data;
|
||||
|
||||
public sealed class VersionCommand : Command<VersionSettings>
|
||||
{
|
||||
private readonly IAnsiConsole _console;
|
||||
|
||||
public VersionCommand(IAnsiConsole console)
|
||||
{
|
||||
_console = console;
|
||||
}
|
||||
|
||||
public override int Execute(CommandContext context, VersionSettings settings)
|
||||
{
|
||||
_console.WriteLine($"VersionCommand ran, Version: {settings.Version ?? string.Empty}");
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user