Merge remote-tracking branch 'jonsequitur/tab-completion' into tab-completion

This commit is contained in:
Piotr Puszkiewicz 2017-03-10 17:37:26 -08:00
commit 23d4fb32f3
38 changed files with 360 additions and 449 deletions

View file

@ -18,10 +18,10 @@ namespace Microsoft.DotNet.Tests.ParserTests
{
var command = Command("the-command", "",
Option("-o|--one", "",
ZeroOrOneArgument
ZeroOrOneArgument()
.ForwardAs(o => $"/i:{o.Arguments.Single()}")),
Option("-t|--two", "",
NoArguments
NoArguments()
.ForwardAs("/s:true")));
var result = command.Parse("the-command -t -o 123");
@ -37,7 +37,7 @@ namespace Microsoft.DotNet.Tests.ParserTests
{
var command = Command("the-command", "",
Option("-x", "",
ZeroOrMoreArguments
ZeroOrMoreArguments()
.ForwardAs(o => $"/x:{string.Join("&", o.Arguments)}")));
var result = command.Parse("the-command -x one -x two");
@ -53,7 +53,7 @@ namespace Microsoft.DotNet.Tests.ParserTests
{
var command = Command("the-command", "",
Option("-x", "",
ZeroOrMoreArguments
ZeroOrMoreArguments()
.Forward()));
var result = command.Parse("the-command -x one");