Add support for directives (debug and preview)

Closes #7
Closes #8
This commit is contained in:
Alexey Golub
2019-08-24 18:22:54 +03:00
parent e4a502d9d6
commit 80bf477f3b
11 changed files with 233 additions and 34 deletions

View File

@@ -165,6 +165,40 @@ namespace CliFx.Tests.Services
new CommandOptionInput("option", "value")
})
);
yield return new TestCaseData(
new[] {"[debug]"},
new CommandInput(null,
new[] {"debug"},
new CommandOptionInput[0])
);
yield return new TestCaseData(
new[] {"[debug]", "[preview]"},
new CommandInput(null,
new[] {"debug", "preview"},
new CommandOptionInput[0])
);
yield return new TestCaseData(
new[] {"[debug]", "[preview]", "-o", "value"},
new CommandInput(null,
new[] {"debug", "preview"},
new[]
{
new CommandOptionInput("o", "value")
})
);
yield return new TestCaseData(
new[] {"command", "[debug]", "[preview]", "-o", "value"},
new CommandInput("command",
new[] {"debug", "preview"},
new[]
{
new CommandOptionInput("o", "value")
})
);
}
[Test]