mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-12-29 03:55:48 +08:00
Preparations for the 1.0 release
* Less cluttered solution layout. * Move examples to a repository of its own. * Move Roslyn analyzer to a repository of its own. * Enable central package management. * Clean up csproj files. * Add README file to NuGet packages.
This commit is contained in:
committed by
Patrik Svensson
parent
bb72b44d60
commit
42fd801876
44
src/Tests/Spectre.Console.Tests/Data/Exceptions.cs
Normal file
44
src/Tests/Spectre.Console.Tests/Data/Exceptions.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
namespace Spectre.Console.Tests.Data;
|
||||
|
||||
public static class TestExceptions
|
||||
{
|
||||
public static bool MethodThatThrows(int? number) => throw new InvalidOperationException("Throwing!");
|
||||
|
||||
public static bool GenericMethodThatThrows<T0, T1, TRet>(int? number) => throw new InvalidOperationException("Throwing!");
|
||||
|
||||
public static void ThrowWithInnerException()
|
||||
{
|
||||
try
|
||||
{
|
||||
MethodThatThrows(null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new InvalidOperationException("Something threw!", ex);
|
||||
}
|
||||
}
|
||||
|
||||
public static void ThrowWithGenericInnerException()
|
||||
{
|
||||
try
|
||||
{
|
||||
GenericMethodThatThrows<int, float, double>(null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new InvalidOperationException("Something threw!", ex);
|
||||
}
|
||||
}
|
||||
|
||||
public static List<T> GenericMethodWithOutThatThrows<T>(out List<T> firstFewItems)
|
||||
{
|
||||
firstFewItems = new List<T>();
|
||||
throw new InvalidOperationException("Throwing!");
|
||||
}
|
||||
|
||||
public static (string Key, List<T> Values) GetTuplesWithInnerException<T>((int First, string Second) myValue)
|
||||
{
|
||||
MethodThatThrows(0);
|
||||
return ("key", new List<T>());
|
||||
}
|
||||
}
|
||||
68
src/Tests/Spectre.Console.Tests/Data/example.json
Normal file
68
src/Tests/Spectre.Console.Tests/Data/example.json
Normal file
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"id": "0001",
|
||||
"type": "donut",
|
||||
"name": "Cake",
|
||||
"ppu": 0.55,
|
||||
"foo": true,
|
||||
"bar": false,
|
||||
"qux": 32,
|
||||
"corgi": null,
|
||||
"batters": {
|
||||
"batter": [
|
||||
{
|
||||
"id": "1001",
|
||||
"type": "Regular",
|
||||
"min": 0
|
||||
},
|
||||
{
|
||||
"id": "1002",
|
||||
"type": "Chocolate",
|
||||
"min": 0.32
|
||||
},
|
||||
{
|
||||
"id": "1003",
|
||||
"min": 12.32,
|
||||
"type": "Blueberry"
|
||||
},
|
||||
{
|
||||
"id": "1004",
|
||||
"min": 0.32E-12,
|
||||
"type": "Devil's Food"
|
||||
}
|
||||
]
|
||||
},
|
||||
"topping": [
|
||||
{
|
||||
"id": "5001",
|
||||
"min": 0.32e-12,
|
||||
"type": "None"
|
||||
},
|
||||
{
|
||||
"id": "5002",
|
||||
"min": 0.32E+12,
|
||||
"type": "Glazed"
|
||||
},
|
||||
{
|
||||
"id": "5005",
|
||||
"min": 0.32e+12,
|
||||
"type": "Sugar"
|
||||
},
|
||||
{
|
||||
"id": "5007",
|
||||
"min": 0.32e12,
|
||||
"type": "Powdered Sugar"
|
||||
},
|
||||
{
|
||||
"id": "5006",
|
||||
"type": "Chocolate with Sprinkles"
|
||||
},
|
||||
{
|
||||
"id": "5003",
|
||||
"type": "Chocolate"
|
||||
},
|
||||
{
|
||||
"id": "5004",
|
||||
"type": "Maple"
|
||||
}
|
||||
]
|
||||
}
|
||||
1239
src/Tests/Spectre.Console.Tests/Data/poison.flf
Normal file
1239
src/Tests/Spectre.Console.Tests/Data/poison.flf
Normal file
File diff suppressed because it is too large
Load Diff
719
src/Tests/Spectre.Console.Tests/Data/starwars.flf
Normal file
719
src/Tests/Spectre.Console.Tests/Data/starwars.flf
Normal file
@@ -0,0 +1,719 @@
|
||||
flf2a$ 7 6 22 15 4
|
||||
starwars.flf by Ryan Youck (youck@cs.uregina.ca) Dec 25/1994
|
||||
I am not responsible for use of this font
|
||||
Based on Big.flf by Glenn Chappell
|
||||
|
||||
$ $@
|
||||
$ $@
|
||||
$ $@
|
||||
$ $@
|
||||
$ $@
|
||||
$ $@
|
||||
$ $@@
|
||||
__ $@
|
||||
| |$@
|
||||
| |$@
|
||||
| |$@
|
||||
|__|$@
|
||||
(__)$@
|
||||
$@@
|
||||
_ _ @
|
||||
( | )@
|
||||
V V @
|
||||
$ @
|
||||
$ @
|
||||
$ @
|
||||
@@
|
||||
_ _ @
|
||||
_| || |_$@
|
||||
|_ __ _|@
|
||||
_| || |_ @
|
||||
|_ __ _|@
|
||||
|_||_| $@
|
||||
@@
|
||||
__,--,_.@
|
||||
/ |@
|
||||
| (----`@
|
||||
\ \ $@
|
||||
.----) | $@
|
||||
|_ __/ $@
|
||||
'--' $@@
|
||||
_ ___$ @
|
||||
/ \ / /$ @
|
||||
( o ) / / $ @
|
||||
\_/ / / _$ @
|
||||
/ / / \ @
|
||||
/ / ( o )@
|
||||
/__/ \_/ @@
|
||||
@
|
||||
___ @
|
||||
( _ ) $@
|
||||
/ _ \/\@
|
||||
| (_> <@
|
||||
\___/\/@
|
||||
$@@
|
||||
__ @
|
||||
(_ )@
|
||||
|/ @
|
||||
$ @
|
||||
$ @
|
||||
$ @
|
||||
@@
|
||||
___@
|
||||
/ /@
|
||||
| |$@
|
||||
| |$@
|
||||
| |$@
|
||||
| |$@
|
||||
\__\@@
|
||||
___ @
|
||||
\ \ @
|
||||
| |@
|
||||
| |@
|
||||
| |@
|
||||
| |@
|
||||
/__/ @@
|
||||
_ @
|
||||
/\| |/\ @
|
||||
\ ` ' /$@
|
||||
|_ _|@
|
||||
/ , . \$@
|
||||
\/|_|\/ @
|
||||
@@
|
||||
@
|
||||
_ @
|
||||
_| |_$@
|
||||
|_ _|@
|
||||
|_| $@
|
||||
$ @
|
||||
@@
|
||||
@
|
||||
@
|
||||
$ @
|
||||
$ @
|
||||
__ @
|
||||
(_ )@
|
||||
|/ @@
|
||||
@
|
||||
@
|
||||
______ @
|
||||
|______|@
|
||||
$ @
|
||||
$ @
|
||||
@@
|
||||
@
|
||||
@
|
||||
@
|
||||
$ @
|
||||
__ @
|
||||
(__)@
|
||||
@@
|
||||
___@
|
||||
/ /@
|
||||
/ / @
|
||||
/ /$ @
|
||||
/ /$ @
|
||||
/__/$ @
|
||||
@@
|
||||
___ $@
|
||||
/ _ \ $@
|
||||
| | | |$@
|
||||
| | | |$@
|
||||
| |_| |$@
|
||||
\___/ $@
|
||||
$@@
|
||||
__ $@
|
||||
/_ |$@
|
||||
| |$@
|
||||
| |$@
|
||||
| |$@
|
||||
|_|$@
|
||||
$@@
|
||||
___ $@
|
||||
|__ \ $@
|
||||
$) |$@
|
||||
/ / $@
|
||||
/ /_ $@
|
||||
|____|$@
|
||||
$@@
|
||||
____ $@
|
||||
|___ \ $@
|
||||
__) |$@
|
||||
|__ < $@
|
||||
___) |$@
|
||||
|____/ $@
|
||||
$@@
|
||||
_ _ $@
|
||||
| || | $@
|
||||
| || |_ $@
|
||||
|__ _|$@
|
||||
| | $@
|
||||
|_| $@
|
||||
$@@
|
||||
_____ $@
|
||||
| ____|$@
|
||||
| |__ $@
|
||||
|___ \ $@
|
||||
___) |$@
|
||||
|____/ $@
|
||||
$@@
|
||||
__ $@
|
||||
/ / $@
|
||||
/ /_ $@
|
||||
| '_ \ $@
|
||||
| (_) |$@
|
||||
\___/ $@
|
||||
$@@
|
||||
______ $@
|
||||
|____ |$@
|
||||
$/ / $@
|
||||
/ / $@
|
||||
/ / $@
|
||||
/_/ $@
|
||||
$@@
|
||||
___ $@
|
||||
/ _ \ $@
|
||||
| (_) |$@
|
||||
> _ < $@
|
||||
| (_) |$@
|
||||
\___/ $@
|
||||
$@@
|
||||
___ $@
|
||||
/ _ \ $@
|
||||
| (_) |$@
|
||||
\__, |$@
|
||||
/ / $@
|
||||
/_/ $@
|
||||
$@@
|
||||
@
|
||||
_ @
|
||||
(_)@
|
||||
$ @
|
||||
_ @
|
||||
(_)@
|
||||
@@
|
||||
@
|
||||
_ @
|
||||
(_)@
|
||||
$ @
|
||||
_ @
|
||||
( )@
|
||||
|/ @@
|
||||
___@
|
||||
/ /@
|
||||
/ /$@
|
||||
< <$ @
|
||||
\ \$@
|
||||
\__\@
|
||||
@@
|
||||
@
|
||||
______ @
|
||||
|______|@
|
||||
______ @
|
||||
|______|@
|
||||
@
|
||||
@@
|
||||
___ @
|
||||
\ \$ @
|
||||
\ \ @
|
||||
> >@
|
||||
/ / @
|
||||
/__/$ @
|
||||
@@
|
||||
______ $@
|
||||
| \ $@
|
||||
`----) |$@
|
||||
/ / $@
|
||||
|__| $@
|
||||
__ $@
|
||||
(__) $@@
|
||||
____ @
|
||||
/ __ \ @
|
||||
/ / _` |@
|
||||
| | (_| |@
|
||||
\ \__,_|@
|
||||
\____/ @
|
||||
@@
|
||||
___ $ @
|
||||
/ \ $ @
|
||||
/ ^ \$ @
|
||||
/ /_\ \$ @
|
||||
/ _____ \$ @
|
||||
/__/ \__\$@
|
||||
$@@
|
||||
.______ $@
|
||||
| _ \ $@
|
||||
| |_) |$@
|
||||
| _ < $@
|
||||
| |_) |$@
|
||||
|______/ $@
|
||||
$@@
|
||||
______$@
|
||||
/ |@
|
||||
| ,----'@
|
||||
| | $@
|
||||
| `----.@
|
||||
\______|@
|
||||
$@@
|
||||
_______ $@
|
||||
| \$@
|
||||
| .--. |@
|
||||
| | | |@
|
||||
| '--' |@
|
||||
|_______/$@
|
||||
$@@
|
||||
_______ @
|
||||
| ____|@
|
||||
| |__ $@
|
||||
| __| $@
|
||||
| |____ @
|
||||
|_______|@
|
||||
@@
|
||||
_______ @
|
||||
| ____|@
|
||||
| |__ $@
|
||||
| __| $@
|
||||
| | $ @
|
||||
|__| @
|
||||
@@
|
||||
_______ @
|
||||
/ _____|@
|
||||
| | __ $@
|
||||
| | |_ |$@
|
||||
| |__| |$@
|
||||
\______|$@
|
||||
$@@
|
||||
__ __ $@
|
||||
| | | |$@
|
||||
| |__| |$@
|
||||
| __ |$@
|
||||
| | | |$@
|
||||
|__| |__|$@
|
||||
$@@
|
||||
__ $@
|
||||
| |$@
|
||||
| |$@
|
||||
| |$@
|
||||
| |$@
|
||||
|__|$@
|
||||
$@@
|
||||
__ $@
|
||||
| |$@
|
||||
| |$@
|
||||
.--. | |$@
|
||||
| `--' |$@
|
||||
\______/ $@
|
||||
$@@
|
||||
__ ___$@
|
||||
| |/ /$@
|
||||
| ' / $@
|
||||
| < $@
|
||||
| . \ $@
|
||||
|__|\__\$@
|
||||
$@@
|
||||
__ $@
|
||||
| | $@
|
||||
| | $@
|
||||
| | $@
|
||||
| `----.@
|
||||
|_______|@
|
||||
$@@
|
||||
.___ ___.$@
|
||||
| \/ |$@
|
||||
| \ / |$@
|
||||
| |\/| |$@
|
||||
| | | |$@
|
||||
|__| |__|$@
|
||||
$@@
|
||||
.__ __.$@
|
||||
| \ | |$@
|
||||
| \| |$@
|
||||
| . ` |$@
|
||||
| |\ |$@
|
||||
|__| \__|$@
|
||||
$@@
|
||||
______ $@
|
||||
/ __ \ $@
|
||||
| | | |$@
|
||||
| | | |$@
|
||||
| `--' |$@
|
||||
\______/ $@
|
||||
$@@
|
||||
.______ $@
|
||||
| _ \ $@
|
||||
| |_) |$@
|
||||
| ___/ $@
|
||||
| | $ @
|
||||
| _| $ @
|
||||
$ @@
|
||||
______ $ @
|
||||
/ __ \ $ @
|
||||
| | | | $ @
|
||||
| | | | $ @
|
||||
| `--' '--. @
|
||||
\_____\_____\@
|
||||
$ @@
|
||||
.______ $ @
|
||||
| _ \ $ @
|
||||
| |_) | $ @
|
||||
| / $ @
|
||||
| |\ \----.@
|
||||
| _| `._____|@
|
||||
$@@
|
||||
_______.@
|
||||
/ |@
|
||||
| (----`@
|
||||
\ \ $@
|
||||
.----) | $@
|
||||
|_______/ $@
|
||||
$@@
|
||||
.___________.@
|
||||
| |@
|
||||
`---| |----`@
|
||||
| | $ @
|
||||
| | $ @
|
||||
|__| $ @
|
||||
$ @@
|
||||
__ __ $@
|
||||
| | | |$@
|
||||
| | | |$@
|
||||
| | | |$@
|
||||
| `--' |$@
|
||||
\______/ $@
|
||||
$@@
|
||||
____ ____$@
|
||||
\ \ / /$@
|
||||
\ \/ /$ @
|
||||
\ /$ @
|
||||
\ /$ @
|
||||
\__/$ @
|
||||
$ @@
|
||||
____ __ ____$@
|
||||
\ \ / \ / /$@
|
||||
\ \/ \/ /$ @
|
||||
\ /$ @
|
||||
\ /\ /$ @
|
||||
\__/ \__/$ @
|
||||
$ @@
|
||||
___ ___$@
|
||||
\ \ / /$@
|
||||
\ V / $@
|
||||
> < $@
|
||||
/ . \ $@
|
||||
/__/ \__\$@
|
||||
$@@
|
||||
____ ____$@
|
||||
\ \ / /$@
|
||||
\ \/ /$ @
|
||||
\_ _/$ @
|
||||
| |$ @
|
||||
|__|$ @
|
||||
$ @@
|
||||
________ $@
|
||||
| / $@
|
||||
`---/ / $@
|
||||
/ / $@
|
||||
/ /----.@
|
||||
/________|@
|
||||
$@@
|
||||
____ @
|
||||
| |@
|
||||
| |-`@
|
||||
| | $@
|
||||
| | $@
|
||||
| |-.@
|
||||
|____|@@
|
||||
___ @
|
||||
\ \ $ @
|
||||
\ \$ @
|
||||
\ \$ @
|
||||
\ \$@
|
||||
\__\@
|
||||
@@
|
||||
____ @
|
||||
| |@
|
||||
`-| |@
|
||||
| |@
|
||||
| |@
|
||||
.-| |@
|
||||
|____|@@
|
||||
___ @
|
||||
/ \ @
|
||||
/--^--\@
|
||||
$@
|
||||
$@
|
||||
$@
|
||||
$@@
|
||||
@
|
||||
@
|
||||
@
|
||||
$ @
|
||||
$ @
|
||||
______ @
|
||||
|______|@@
|
||||
__ @
|
||||
( _)@
|
||||
\| @
|
||||
$ @
|
||||
$ @
|
||||
$ @
|
||||
@@
|
||||
___ $ @
|
||||
/ \ $ @
|
||||
/ ^ \$ @
|
||||
/ /_\ \$ @
|
||||
/ _____ \$ @
|
||||
/__/ \__\$@
|
||||
$@@
|
||||
.______ $@
|
||||
| _ \ $@
|
||||
| |_) |$@
|
||||
| _ < $@
|
||||
| |_) |$@
|
||||
|______/ $@
|
||||
$@@
|
||||
______$@
|
||||
/ |@
|
||||
| ,----'@
|
||||
| | $@
|
||||
| `----.@
|
||||
\______|@
|
||||
$@@
|
||||
_______ $@
|
||||
| \$@
|
||||
| .--. |@
|
||||
| | | |@
|
||||
| '--' |@
|
||||
|_______/$@
|
||||
$@@
|
||||
_______ @
|
||||
| ____|@
|
||||
| |__ $@
|
||||
| __| $@
|
||||
| |____ @
|
||||
|_______|@
|
||||
@@
|
||||
_______ @
|
||||
| ____|@
|
||||
| |__ $@
|
||||
| __| $@
|
||||
| | $ @
|
||||
|__| @
|
||||
@@
|
||||
_______ @
|
||||
/ _____|@
|
||||
| | __ $@
|
||||
| | |_ |$@
|
||||
| |__| |$@
|
||||
\______|$@
|
||||
$@@
|
||||
__ __ $@
|
||||
| | | |$@
|
||||
| |__| |$@
|
||||
| __ |$@
|
||||
| | | |$@
|
||||
|__| |__|$@
|
||||
$@@
|
||||
__ $@
|
||||
| |$@
|
||||
| |$@
|
||||
| |$@
|
||||
| |$@
|
||||
|__|$@
|
||||
$@@
|
||||
__ $@
|
||||
| |$@
|
||||
| |$@
|
||||
.--. | |$@
|
||||
| `--' |$@
|
||||
\______/ $@
|
||||
$@@
|
||||
__ ___$@
|
||||
| |/ /$@
|
||||
| ' / $@
|
||||
| < $@
|
||||
| . \ $@
|
||||
|__|\__\$@
|
||||
$@@
|
||||
__ $@
|
||||
| | $@
|
||||
| | $@
|
||||
| | $@
|
||||
| `----.@
|
||||
|_______|@
|
||||
$@@
|
||||
.___ ___.$@
|
||||
| \/ |$@
|
||||
| \ / |$@
|
||||
| |\/| |$@
|
||||
| | | |$@
|
||||
|__| |__|$@
|
||||
$@@
|
||||
.__ __.$@
|
||||
| \ | |$@
|
||||
| \| |$@
|
||||
| . ` |$@
|
||||
| |\ |$@
|
||||
|__| \__|$@
|
||||
$@@
|
||||
______ $@
|
||||
/ __ \ $@
|
||||
| | | |$@
|
||||
| | | |$@
|
||||
| `--' |$@
|
||||
\______/ $@
|
||||
$@@
|
||||
.______ $@
|
||||
| _ \ $@
|
||||
| |_) |$@
|
||||
| ___/ $@
|
||||
| | $ @
|
||||
| _| $ @
|
||||
$ @@
|
||||
______ $ @
|
||||
/ __ \ $ @
|
||||
| | | | $ @
|
||||
| | | | $ @
|
||||
| `--' '--. @
|
||||
\_____\_____\@
|
||||
$ @@
|
||||
.______ $ @
|
||||
| _ \ $ @
|
||||
| |_) | $ @
|
||||
| / $ @
|
||||
| |\ \----.@
|
||||
| _| `._____|@
|
||||
$@@
|
||||
_______.@
|
||||
/ |@
|
||||
| (----`@
|
||||
\ \ $@
|
||||
.----) | $@
|
||||
|_______/ $@
|
||||
$@@
|
||||
.___________.@
|
||||
| |@
|
||||
`---| |----`@
|
||||
| | $ @
|
||||
| | $ @
|
||||
|__| $ @
|
||||
$ @@
|
||||
__ __ $@
|
||||
| | | |$@
|
||||
| | | |$@
|
||||
| | | |$@
|
||||
| `--' |$@
|
||||
\______/ $@
|
||||
$@@
|
||||
____ ____$@
|
||||
\ \ / /$@
|
||||
\ \/ /$ @
|
||||
\ /$ @
|
||||
\ /$ @
|
||||
\__/$ @
|
||||
$ @@
|
||||
____ __ ____$@
|
||||
\ \ / \ / /$@
|
||||
\ \/ \/ /$ @
|
||||
\ /$ @
|
||||
\ /\ /$ @
|
||||
\__/ \__/$ @
|
||||
$ @@
|
||||
___ ___$@
|
||||
\ \ / /$@
|
||||
\ V / $@
|
||||
> < $@
|
||||
/ . \ $@
|
||||
/__/ \__\$@
|
||||
$@@
|
||||
____ ____$@
|
||||
\ \ / /$@
|
||||
\ \/ /$ @
|
||||
\_ _/$ @
|
||||
| |$ @
|
||||
|__|$ @
|
||||
$ @@
|
||||
________ $@
|
||||
| / $@
|
||||
`---/ / $@
|
||||
/ / $@
|
||||
/ /----.@
|
||||
/________|@
|
||||
$@@
|
||||
___@
|
||||
/ /@
|
||||
| |$@
|
||||
/ /$ @
|
||||
\ \$ @
|
||||
| |$@
|
||||
\__\@@
|
||||
__ $@
|
||||
| |$@
|
||||
| |$@
|
||||
| |$@
|
||||
| |$@
|
||||
| |$@
|
||||
|__|$@@
|
||||
___ @
|
||||
\ \$ @
|
||||
| | @
|
||||
\ \@
|
||||
/ /@
|
||||
| | @
|
||||
/__/$ @@
|
||||
__ _ @
|
||||
/ \/ |@
|
||||
|_/\__/ @
|
||||
$ @
|
||||
$ @
|
||||
$ @
|
||||
@@
|
||||
_ _ @
|
||||
(_)_(_) @
|
||||
/ \ @
|
||||
/ _ \ @
|
||||
/ ___ \ @
|
||||
/_/ \_\@
|
||||
@@
|
||||
_ _ @
|
||||
(_)_(_)@
|
||||
/ _ \ @
|
||||
| | | |@
|
||||
| |_| |@
|
||||
\___/ @
|
||||
@@
|
||||
_ _ @
|
||||
(_) (_)@
|
||||
| | | |@
|
||||
| | | |@
|
||||
| |_| |@
|
||||
\___/ @
|
||||
@@
|
||||
_ _ @
|
||||
(_) (_)@
|
||||
__ _ @
|
||||
/ _` |@
|
||||
| (_| |@
|
||||
\__,_|@
|
||||
@@
|
||||
_ _ @
|
||||
(_) (_)@
|
||||
___ @
|
||||
/ _ \ @
|
||||
| (_) |@
|
||||
\___/ @
|
||||
@@
|
||||
_ _ @
|
||||
(_) (_)@
|
||||
_ _ @
|
||||
| | | |@
|
||||
| |_| |@
|
||||
\__,_|@
|
||||
@@
|
||||
___ @
|
||||
/ _ \ @
|
||||
| | ) |@
|
||||
| |< < @
|
||||
| | ) |@
|
||||
| ||_/ @
|
||||
|_| @@
|
||||
@@ -0,0 +1,3 @@
|
||||
Foo
|
||||
[?1049h[HBar
|
||||
[?1049l
|
||||
@@ -0,0 +1,5 @@
|
||||
Error: An error occured when parsing template.
|
||||
Arguments can not contain options.
|
||||
|
||||
--foo <BAR>
|
||||
^^^^^ Not permitted
|
||||
@@ -0,0 +1,5 @@
|
||||
Error: An error occured when parsing template.
|
||||
Encountered invalid character '$' in option name.
|
||||
|
||||
--f$oo
|
||||
^ Invalid character
|
||||
@@ -0,0 +1,5 @@
|
||||
Error: An error occured when parsing template.
|
||||
Encountered invalid character '$' in value name.
|
||||
|
||||
-f|--foo <F$OO>
|
||||
^ Invalid character
|
||||
@@ -0,0 +1,5 @@
|
||||
Error: An error occured when parsing template.
|
||||
Long option names must consist of more than one character.
|
||||
|
||||
--f
|
||||
^ Invalid option name
|
||||
@@ -0,0 +1,5 @@
|
||||
Error: An error occured when parsing template.
|
||||
No long or short name for option has been specified.
|
||||
|
||||
<FOO>
|
||||
^^^^^ Missing option. Was this meant to be an argument?
|
||||
@@ -0,0 +1,5 @@
|
||||
Error: An error occured when parsing template.
|
||||
Multiple option values are not supported.
|
||||
|
||||
-f|--foo <FOO> <BAR>
|
||||
^^^^^ Too many option values
|
||||
@@ -0,0 +1,5 @@
|
||||
Error: An error occured when parsing template.
|
||||
Multiple values are not supported.
|
||||
|
||||
<FOO> <BAR>
|
||||
^^^^^ Too many values
|
||||
@@ -0,0 +1,5 @@
|
||||
Error: An error occured when parsing template.
|
||||
Option names cannot start with a digit.
|
||||
|
||||
--1foo
|
||||
^^^^ Invalid option name
|
||||
@@ -0,0 +1,5 @@
|
||||
Error: An error occured when parsing template.
|
||||
Options without name are not allowed.
|
||||
|
||||
--foo|-
|
||||
^ Missing option name
|
||||
@@ -0,0 +1,5 @@
|
||||
Error: An error occured when parsing template.
|
||||
Short option names can not be longer than one character.
|
||||
|
||||
--foo|-bar
|
||||
^^^ Invalid option name
|
||||
@@ -0,0 +1,5 @@
|
||||
Error: An error occured when parsing template.
|
||||
Encountered unexpected character '$'.
|
||||
|
||||
<FOO> $ <BAR>
|
||||
^ Unexpected character
|
||||
@@ -0,0 +1,5 @@
|
||||
Error: An error occured when parsing template.
|
||||
Encountered unterminated value name 'BAR'.
|
||||
|
||||
--foo|-f <BAR
|
||||
^^^^ Unterminated value name
|
||||
@@ -0,0 +1,5 @@
|
||||
Error: An error occured when parsing template.
|
||||
Values without name are not allowed.
|
||||
|
||||
<>
|
||||
^^ Missing value name
|
||||
@@ -0,0 +1,12 @@
|
||||
USAGE:
|
||||
myapp <FOO> <BAR> <BAZ> <CORGI> [QUX] [OPTIONS]
|
||||
|
||||
ARGUMENTS:
|
||||
<FOO>
|
||||
<BAR>
|
||||
<BAZ>
|
||||
<CORGI>
|
||||
[QUX]
|
||||
|
||||
OPTIONS:
|
||||
-h, --help Prints help information
|
||||
@@ -0,0 +1,14 @@
|
||||
USAGE:
|
||||
myapp cat [LEGS] [OPTIONS] <COMMAND>
|
||||
|
||||
ARGUMENTS:
|
||||
[LEGS] The number of legs
|
||||
|
||||
OPTIONS:
|
||||
-h, --help Prints help information
|
||||
-a, --alive Indicates whether or not the animal is alive
|
||||
-n, --name <VALUE>
|
||||
--agility <VALUE> The agility between 0 and 100
|
||||
|
||||
COMMANDS:
|
||||
lion <TEETH> The lion command
|
||||
@@ -0,0 +1,16 @@
|
||||
USAGE:
|
||||
myapp animal [LEGS] [OPTIONS] <COMMAND>
|
||||
|
||||
EXAMPLES:
|
||||
myapp animal --help
|
||||
|
||||
ARGUMENTS:
|
||||
[LEGS] The number of legs
|
||||
|
||||
OPTIONS:
|
||||
-h, --help Prints help information
|
||||
-a, --alive Indicates whether or not the animal is alive
|
||||
|
||||
COMMANDS:
|
||||
dog <AGE> The dog command
|
||||
horse The horse command
|
||||
@@ -0,0 +1,13 @@
|
||||
USAGE:
|
||||
myapp <TEETH> [LEGS] [OPTIONS]
|
||||
|
||||
ARGUMENTS:
|
||||
<TEETH> The number of teeth the lion has
|
||||
[LEGS] The number of legs
|
||||
|
||||
OPTIONS:
|
||||
-h, --help Prints help information
|
||||
-a, --alive Indicates whether or not the animal is alive
|
||||
-n, --name <VALUE>
|
||||
--agility <VALUE> The agility between 0 and 100
|
||||
-c <CHILDREN> The number of children the lion has
|
||||
@@ -0,0 +1,16 @@
|
||||
USAGE:
|
||||
myapp <TEETH> [LEGS] [OPTIONS]
|
||||
|
||||
EXAMPLES:
|
||||
myapp 12 -c 3
|
||||
|
||||
ARGUMENTS:
|
||||
<TEETH> The number of teeth the lion has
|
||||
[LEGS] The number of legs
|
||||
|
||||
OPTIONS:
|
||||
-h, --help Prints help information
|
||||
-a, --alive Indicates whether or not the animal is alive
|
||||
-n, --name <VALUE>
|
||||
--agility <VALUE> The agility between 0 and 100
|
||||
-c <CHILDREN> The number of children the lion has
|
||||
@@ -0,0 +1,9 @@
|
||||
USAGE:
|
||||
myapp <FOO> [OPTIONS]
|
||||
|
||||
ARGUMENTS:
|
||||
<FOO> Dummy argument FOO
|
||||
|
||||
OPTIONS:
|
||||
-h, --help Prints help information
|
||||
--baz Dummy option BAZ
|
||||
@@ -0,0 +1,10 @@
|
||||
USAGE:
|
||||
myapp [OPTIONS] <COMMAND>
|
||||
|
||||
OPTIONS:
|
||||
-h, --help Prints help information
|
||||
-v, --version Prints version information
|
||||
|
||||
COMMANDS:
|
||||
dog <AGE> The dog command
|
||||
horse The horse command
|
||||
@@ -0,0 +1,9 @@
|
||||
USAGE:
|
||||
myapp cat [LEGS] lion <TEETH> [OPTIONS]
|
||||
|
||||
ARGUMENTS:
|
||||
<TEETH> The number of teeth the lion has
|
||||
|
||||
OPTIONS:
|
||||
-h, --help Prints help information
|
||||
-c <CHILDREN> The number of children the lion has
|
||||
@@ -0,0 +1,9 @@
|
||||
USAGE:
|
||||
myapp [OPTIONS] <COMMAND>
|
||||
|
||||
OPTIONS:
|
||||
-h, --help Prints help information
|
||||
-v, --version Prints version information
|
||||
|
||||
COMMANDS:
|
||||
bar
|
||||
@@ -0,0 +1,11 @@
|
||||
USAGE:
|
||||
myapp [OPTIONS] <COMMAND>
|
||||
|
||||
OPTIONS:
|
||||
-h, --help Prints help information
|
||||
-v, --version Prints version information
|
||||
|
||||
COMMANDS:
|
||||
dog <AGE> The dog command
|
||||
horse The horse command
|
||||
giraffe <LENGTH> The giraffe command
|
||||
@@ -0,0 +1,14 @@
|
||||
USAGE:
|
||||
myapp [OPTIONS] <COMMAND>
|
||||
|
||||
EXAMPLES:
|
||||
myapp dog --name Rufus --age 12 --good-boy
|
||||
myapp horse --name Brutus
|
||||
|
||||
OPTIONS:
|
||||
-h, --help Prints help information
|
||||
-v, --version Prints version information
|
||||
|
||||
COMMANDS:
|
||||
dog <AGE> The dog command
|
||||
horse The horse command
|
||||
@@ -0,0 +1,14 @@
|
||||
USAGE:
|
||||
myapp [OPTIONS] <COMMAND>
|
||||
|
||||
EXAMPLES:
|
||||
myapp dog --name Rufus --age 12 --good-boy
|
||||
myapp horse --name Brutus
|
||||
|
||||
OPTIONS:
|
||||
-h, --help Prints help information
|
||||
-v, --version Prints version information
|
||||
|
||||
COMMANDS:
|
||||
dog <AGE> The dog command
|
||||
horse The horse command
|
||||
@@ -0,0 +1,13 @@
|
||||
USAGE:
|
||||
myapp [OPTIONS] <COMMAND>
|
||||
|
||||
EXAMPLES:
|
||||
myapp animal dog --name Rufus --age 12 --good-boy
|
||||
myapp animal horse --name Brutus
|
||||
|
||||
OPTIONS:
|
||||
-h, --help Prints help information
|
||||
-v, --version Prints version information
|
||||
|
||||
COMMANDS:
|
||||
animal The animal command
|
||||
@@ -0,0 +1,4 @@
|
||||
Error: Flags cannot be assigned a value.
|
||||
|
||||
dog --alive foo
|
||||
^^^^^^^ Can't assign value
|
||||
@@ -0,0 +1,4 @@
|
||||
Error: Flags cannot be assigned a value.
|
||||
|
||||
dog -a foo
|
||||
^^ Can't assign value
|
||||
@@ -0,0 +1,4 @@
|
||||
Error: Short option does not have a valid name.
|
||||
|
||||
dog -f0o
|
||||
^ Not a valid name for a short option
|
||||
@@ -0,0 +1,4 @@
|
||||
Error: Invalid long option name.
|
||||
|
||||
dog --f€oo
|
||||
^ Invalid character
|
||||
@@ -0,0 +1,4 @@
|
||||
Error: Invalid long option name.
|
||||
|
||||
dog --
|
||||
^^ Did you forget the option name?
|
||||
@@ -0,0 +1,4 @@
|
||||
Error: Invalid long option name.
|
||||
|
||||
dog --f
|
||||
^^^ Did you mean -f?
|
||||
@@ -0,0 +1,4 @@
|
||||
Error: Invalid long option name.
|
||||
|
||||
dog --1foo
|
||||
^^^^^^ Option names cannot start with a digit
|
||||
@@ -0,0 +1,4 @@
|
||||
Error: Could not match 'baz' with an argument.
|
||||
|
||||
giraffe foo bar baz
|
||||
^^^ Could not match to argument
|
||||
@@ -0,0 +1,4 @@
|
||||
Error: Option 'name' is defined but no value has been provided.
|
||||
|
||||
dog --name
|
||||
^^^^^^ No value provided
|
||||
@@ -0,0 +1,4 @@
|
||||
Error: Option 'name' is defined but no value has been provided.
|
||||
|
||||
dog -n
|
||||
^^ No value provided
|
||||
@@ -0,0 +1,4 @@
|
||||
Error: Option does not have a name.
|
||||
|
||||
dog -
|
||||
^ Did you forget the option name?
|
||||
@@ -0,0 +1,4 @@
|
||||
Error: Expected an option value.
|
||||
|
||||
dog --foo=
|
||||
^ Did you forget the option value?
|
||||
@@ -0,0 +1,4 @@
|
||||
Error: Expected an option value.
|
||||
|
||||
dog --foo:
|
||||
^ Did you forget the option value?
|
||||
@@ -0,0 +1,4 @@
|
||||
Error: Expected an option value.
|
||||
|
||||
dog -f=
|
||||
^ Did you forget the option value?
|
||||
@@ -0,0 +1,4 @@
|
||||
Error: Expected an option value.
|
||||
|
||||
dog -f:
|
||||
^ Did you forget the option value?
|
||||
@@ -0,0 +1,4 @@
|
||||
Error: Unexpected option 'foo'.
|
||||
|
||||
--foo
|
||||
^^^^^ Did you forget the command?
|
||||
@@ -0,0 +1,4 @@
|
||||
Error: Unexpected option 'f'.
|
||||
|
||||
-f
|
||||
^^ Did you forget the command?
|
||||
@@ -0,0 +1,4 @@
|
||||
Error: Unknown command 'cat'.
|
||||
|
||||
cat 14
|
||||
^^^ No such command
|
||||
@@ -0,0 +1,4 @@
|
||||
Error: Unknown command 'other'.
|
||||
|
||||
empty other
|
||||
^^^^^ No such command
|
||||
@@ -0,0 +1,4 @@
|
||||
Error: Unknown command 'bat'.
|
||||
|
||||
dog bat 14
|
||||
^^^ Did you mean 'cat'?
|
||||
@@ -0,0 +1,4 @@
|
||||
Error: Unknown command 'bat'.
|
||||
|
||||
bat 14
|
||||
^^^ Did you mean 'cat'?
|
||||
@@ -0,0 +1,4 @@
|
||||
Error: Unknown command 'bat'.
|
||||
|
||||
bat
|
||||
^^^ Did you mean 'cat'?
|
||||
@@ -0,0 +1,4 @@
|
||||
Error: Unknown command 'bat'.
|
||||
|
||||
dog bat
|
||||
^^^ Did you mean 'cat'?
|
||||
@@ -0,0 +1,4 @@
|
||||
Error: Unknown command 'bat'.
|
||||
|
||||
qux bat
|
||||
^^^ Did you mean 'bar'?
|
||||
@@ -0,0 +1,4 @@
|
||||
Error: Unknown command 'bat'.
|
||||
|
||||
foo qux bat
|
||||
^^^ Did you mean 'bar'?
|
||||
@@ -0,0 +1,4 @@
|
||||
Error: Unknown option 'unknown'.
|
||||
|
||||
dog --unknown
|
||||
^^^^^^^^^ Unknown option
|
||||
@@ -0,0 +1,4 @@
|
||||
Error: Unknown option 'u'.
|
||||
|
||||
dog -u
|
||||
^^ Unknown option
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Model>
|
||||
<!--DEFAULT COMMAND-->
|
||||
<Command Name="__default_command" IsBranch="false" IsDefault="true" ClrType="Spectre.Console.Tests.Data.HiddenOptionsCommand" Settings="Spectre.Console.Tests.Data.HiddenOptionSettings">
|
||||
<Parameters>
|
||||
<Argument Name="FOO" Position="0" Required="true" Kind="scalar" ClrType="System.Int32">
|
||||
<Description>Dummy argument FOO</Description>
|
||||
</Argument>
|
||||
<Option Short="" Long="baz" Value="NULL" Required="false" Kind="scalar" ClrType="System.Int32">
|
||||
<Description>Dummy option BAZ</Description>
|
||||
</Option>
|
||||
</Parameters>
|
||||
</Command>
|
||||
</Model>
|
||||
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Model>
|
||||
<!--ANIMAL-->
|
||||
<Command Name="animal" IsBranch="true" Settings="Spectre.Console.Tests.Data.AnimalSettings">
|
||||
<Parameters>
|
||||
<Argument Name="LEGS" Position="0" Required="false" Kind="scalar" ClrType="System.Int32">
|
||||
<Description>The number of legs.</Description>
|
||||
<Validators>
|
||||
<Validator ClrType="Spectre.Console.Tests.Data.EvenNumberValidatorAttribute" Message="Animals must have an even number of legs." />
|
||||
<Validator ClrType="Spectre.Console.Tests.Data.PositiveNumberValidatorAttribute" Message="Number of legs must be greater than 0." />
|
||||
</Validators>
|
||||
</Argument>
|
||||
<Option Short="a" Long="alive,not-dead" Value="NULL" Required="false" Kind="flag" ClrType="System.Boolean">
|
||||
<Description>Indicates whether or not the animal is alive.</Description>
|
||||
</Option>
|
||||
</Parameters>
|
||||
<!--MAMMAL-->
|
||||
<Command Name="mammal" IsBranch="true" Settings="Spectre.Console.Tests.Data.MammalSettings">
|
||||
<Parameters>
|
||||
<Option Short="n,p" Long="name,pet-name" Value="VALUE" Required="false" Kind="scalar" ClrType="System.String" />
|
||||
</Parameters>
|
||||
<!--DOG-->
|
||||
<Command Name="dog" IsBranch="false" ClrType="Spectre.Console.Tests.Data.DogCommand" Settings="Spectre.Console.Tests.Data.DogSettings">
|
||||
<Parameters>
|
||||
<Argument Name="AGE" Position="0" Required="true" Kind="scalar" ClrType="System.Int32" />
|
||||
<Option Short="g" Long="good-boy" Value="NULL" Required="false" Kind="flag" ClrType="System.Boolean" />
|
||||
</Parameters>
|
||||
</Command>
|
||||
<!--HORSE-->
|
||||
<Command Name="horse" IsBranch="false" ClrType="Spectre.Console.Tests.Data.HorseCommand" Settings="Spectre.Console.Tests.Data.MammalSettings">
|
||||
<Parameters>
|
||||
<Option Shadowed="true" Short="n,p" Long="name,pet-name" Value="VALUE" Required="false" Kind="scalar" ClrType="System.String" />
|
||||
</Parameters>
|
||||
</Command>
|
||||
</Command>
|
||||
</Command>
|
||||
</Model>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Model>
|
||||
<!--DOG-->
|
||||
<Command Name="dog" IsBranch="false" ClrType="Spectre.Console.Tests.Data.DogCommand" Settings="Spectre.Console.Tests.Data.DogSettings">
|
||||
<Parameters>
|
||||
<Argument Name="LEGS" Position="0" Required="false" Kind="scalar" ClrType="System.Int32">
|
||||
<Description>The number of legs.</Description>
|
||||
<Validators>
|
||||
<Validator ClrType="Spectre.Console.Tests.Data.EvenNumberValidatorAttribute" Message="Animals must have an even number of legs." />
|
||||
<Validator ClrType="Spectre.Console.Tests.Data.PositiveNumberValidatorAttribute" Message="Number of legs must be greater than 0." />
|
||||
</Validators>
|
||||
</Argument>
|
||||
<Argument Name="AGE" Position="1" Required="true" Kind="scalar" ClrType="System.Int32" />
|
||||
<Option Short="a" Long="alive,not-dead" Value="NULL" Required="false" Kind="flag" ClrType="System.Boolean">
|
||||
<Description>Indicates whether or not the animal is alive.</Description>
|
||||
</Option>
|
||||
<Option Short="g" Long="good-boy" Value="NULL" Required="false" Kind="flag" ClrType="System.Boolean" />
|
||||
<Option Short="n,p" Long="name,pet-name" Value="VALUE" Required="false" Kind="scalar" ClrType="System.String" />
|
||||
</Parameters>
|
||||
</Command>
|
||||
</Model>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Model>
|
||||
<!--ANIMAL-->
|
||||
<Command Name="animal" IsBranch="true" Settings="Spectre.Console.Tests.Data.AnimalSettings">
|
||||
<Parameters>
|
||||
<Argument Name="LEGS" Position="0" Required="false" Kind="scalar" ClrType="System.Int32">
|
||||
<Description>The number of legs.</Description>
|
||||
<Validators>
|
||||
<Validator ClrType="Spectre.Console.Tests.Data.EvenNumberValidatorAttribute" Message="Animals must have an even number of legs." />
|
||||
<Validator ClrType="Spectre.Console.Tests.Data.PositiveNumberValidatorAttribute" Message="Number of legs must be greater than 0." />
|
||||
</Validators>
|
||||
</Argument>
|
||||
<Option Short="a" Long="alive,not-dead" Value="NULL" Required="false" Kind="flag" ClrType="System.Boolean">
|
||||
<Description>Indicates whether or not the animal is alive.</Description>
|
||||
</Option>
|
||||
</Parameters>
|
||||
<!--DOG-->
|
||||
<Command Name="dog" IsBranch="false" ClrType="Spectre.Console.Tests.Data.DogCommand" Settings="Spectre.Console.Tests.Data.DogSettings">
|
||||
<Parameters>
|
||||
<Argument Name="AGE" Position="0" Required="true" Kind="scalar" ClrType="System.Int32" />
|
||||
<Option Short="g" Long="good-boy" Value="NULL" Required="false" Kind="flag" ClrType="System.Boolean" />
|
||||
<Option Short="n,p" Long="name,pet-name" Value="VALUE" Required="false" Kind="scalar" ClrType="System.String" />
|
||||
</Parameters>
|
||||
</Command>
|
||||
<!--HORSE-->
|
||||
<Command Name="horse" IsBranch="false" ClrType="Spectre.Console.Tests.Data.HorseCommand" Settings="Spectre.Console.Tests.Data.MammalSettings">
|
||||
<Parameters>
|
||||
<Option Short="n,p" Long="name,pet-name" Value="VALUE" Required="false" Kind="scalar" ClrType="System.String" />
|
||||
</Parameters>
|
||||
</Command>
|
||||
</Command>
|
||||
</Model>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Model>
|
||||
<!--ANIMAL-->
|
||||
<Command Name="animal" IsBranch="true" Settings="Spectre.Console.Tests.Data.AnimalSettings">
|
||||
<Parameters>
|
||||
<Argument Name="LEGS" Position="0" Required="false" Kind="scalar" ClrType="System.Int32">
|
||||
<Description>The number of legs.</Description>
|
||||
<Validators>
|
||||
<Validator ClrType="Spectre.Console.Tests.Data.EvenNumberValidatorAttribute" Message="Animals must have an even number of legs." />
|
||||
<Validator ClrType="Spectre.Console.Tests.Data.PositiveNumberValidatorAttribute" Message="Number of legs must be greater than 0." />
|
||||
</Validators>
|
||||
</Argument>
|
||||
<Option Short="a" Long="alive,not-dead" Value="NULL" Required="false" Kind="flag" ClrType="System.Boolean">
|
||||
<Description>Indicates whether or not the animal is alive.</Description>
|
||||
</Option>
|
||||
</Parameters>
|
||||
<!--DOG-->
|
||||
<Command Name="dog" IsBranch="false" ClrType="Spectre.Console.Tests.Data.DogCommand" Settings="Spectre.Console.Tests.Data.DogSettings">
|
||||
<Parameters>
|
||||
<Argument Name="AGE" Position="0" Required="true" Kind="scalar" ClrType="System.Int32" />
|
||||
<Option Short="g" Long="good-boy" Value="NULL" Required="false" Kind="flag" ClrType="System.Boolean" />
|
||||
<Option Short="n,p" Long="name,pet-name" Value="VALUE" Required="false" Kind="scalar" ClrType="System.String" />
|
||||
</Parameters>
|
||||
</Command>
|
||||
</Command>
|
||||
</Model>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Model>
|
||||
<!--CMD-->
|
||||
<Command Name="cmd" IsBranch="false" ClrType="Spectre.Console.Tests.Data.OptionVectorCommand" Settings="Spectre.Console.Tests.Data.OptionVectorSettings">
|
||||
<Parameters>
|
||||
<Option Short="" Long="bar" Value="NULL" Required="false" Kind="vector" ClrType="System.Int32[]" />
|
||||
<Option Short="" Long="foo" Value="NULL" Required="false" Kind="vector" ClrType="System.String[]" />
|
||||
</Parameters>
|
||||
</Command>
|
||||
</Model>
|
||||
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Model>
|
||||
<!--DEFAULT COMMAND-->
|
||||
<Command Name="__default_command" IsBranch="false" IsDefault="true" ClrType="Spectre.Console.Tests.Data.DogCommand" Settings="Spectre.Console.Tests.Data.DogSettings">
|
||||
<Parameters>
|
||||
<Argument Name="LEGS" Position="0" Required="false" Kind="scalar" ClrType="System.Int32">
|
||||
<Description>The number of legs.</Description>
|
||||
<Validators>
|
||||
<Validator ClrType="Spectre.Console.Tests.Data.EvenNumberValidatorAttribute" Message="Animals must have an even number of legs." />
|
||||
<Validator ClrType="Spectre.Console.Tests.Data.PositiveNumberValidatorAttribute" Message="Number of legs must be greater than 0." />
|
||||
</Validators>
|
||||
</Argument>
|
||||
<Argument Name="AGE" Position="1" Required="true" Kind="scalar" ClrType="System.Int32" />
|
||||
<Option Short="a" Long="alive,not-dead" Value="NULL" Required="false" Kind="flag" ClrType="System.Boolean">
|
||||
<Description>Indicates whether or not the animal is alive.</Description>
|
||||
</Option>
|
||||
<Option Short="g" Long="good-boy" Value="NULL" Required="false" Kind="flag" ClrType="System.Boolean" />
|
||||
<Option Short="n,p" Long="name,pet-name" Value="VALUE" Required="false" Kind="scalar" ClrType="System.String" />
|
||||
</Parameters>
|
||||
</Command>
|
||||
<!--HORSE-->
|
||||
<Command Name="horse" IsBranch="false" ClrType="Spectre.Console.Tests.Data.HorseCommand" Settings="Spectre.Console.Tests.Data.MammalSettings">
|
||||
<Parameters>
|
||||
<Argument Name="LEGS" Position="0" Required="false" Kind="scalar" ClrType="System.Int32">
|
||||
<Description>The number of legs.</Description>
|
||||
<Validators>
|
||||
<Validator ClrType="Spectre.Console.Tests.Data.EvenNumberValidatorAttribute" Message="Animals must have an even number of legs." />
|
||||
<Validator ClrType="Spectre.Console.Tests.Data.PositiveNumberValidatorAttribute" Message="Number of legs must be greater than 0." />
|
||||
</Validators>
|
||||
</Argument>
|
||||
<Option Short="a" Long="alive,not-dead" Value="NULL" Required="false" Kind="flag" ClrType="System.Boolean">
|
||||
<Description>Indicates whether or not the animal is alive.</Description>
|
||||
</Option>
|
||||
<Option Short="n,p" Long="name,pet-name" Value="VALUE" Required="false" Kind="scalar" ClrType="System.String" />
|
||||
</Parameters>
|
||||
</Command>
|
||||
</Model>
|
||||
@@ -0,0 +1,7 @@
|
||||
System.InvalidOperationException: Something threw!
|
||||
System.InvalidOperationException: Throwing!
|
||||
at bool Spectre.Console.Tests.Data.TestExceptions.GenericMethodThatThrows<T0,T1,TRet>(int? number) in /xyz/Exceptions.cs:nn
|
||||
at void Spectre.Console.Tests.Data.TestExceptions.ThrowWithGenericInnerException() in /xyz/Exceptions.cs:nn
|
||||
at void Spectre.Console.Tests.Data.TestExceptions.ThrowWithGenericInnerException() in /xyz/Exceptions.cs:nn
|
||||
at void Spectre.Console.Tests.Unit.ExceptionTests.<>c.<Should_Write_Exceptions_With_Generic_Type_Parameters_In_Callsite_As_Expected>b__4_0() in /xyz/ExceptionTests.cs:nn
|
||||
at Exception Spectre.Console.Tests.Unit.ExceptionTests.GetException(Action action) in /xyz/ExceptionTests.cs:nn
|
||||
@@ -0,0 +1,4 @@
|
||||
System.InvalidOperationException: Throwing!
|
||||
at bool Spectre.Console.Tests.Data.TestExceptions.MethodThatThrows(int? number) in /xyz/Exceptions.cs:nn
|
||||
at void Spectre.Console.Tests.Unit.ExceptionTests.<>c.<Should_Write_Exception>b__0_0() in /xyz/ExceptionTests.cs:nn
|
||||
at Exception Spectre.Console.Tests.Unit.ExceptionTests.GetException(Action action) in /xyz/ExceptionTests.cs:nn
|
||||
@@ -0,0 +1,7 @@
|
||||
System.InvalidOperationException: Something threw!
|
||||
System.InvalidOperationException: Throwing!
|
||||
at bool Spectre.Console.Tests.Data.TestExceptions.MethodThatThrows(int? number) in /xyz/Exceptions.cs:nn
|
||||
at void Spectre.Console.Tests.Data.TestExceptions.ThrowWithInnerException() in /xyz/Exceptions.cs:nn
|
||||
at void Spectre.Console.Tests.Data.TestExceptions.ThrowWithInnerException() in /xyz/Exceptions.cs:nn
|
||||
at void Spectre.Console.Tests.Unit.ExceptionTests.<>c.<Should_Write_Exception_With_Inner_Exception>b__3_0() in /xyz/ExceptionTests.cs:nn
|
||||
at Exception Spectre.Console.Tests.Unit.ExceptionTests.GetException(Action action) in /xyz/ExceptionTests.cs:nn
|
||||
@@ -0,0 +1,2 @@
|
||||
System.InvalidOperationException: Something threw!
|
||||
System.InvalidOperationException: Throwing!
|
||||
@@ -0,0 +1,4 @@
|
||||
InvalidOperationException: Throwing!
|
||||
at List<T> Spectre.Console.Tests.Data.TestExceptions.GenericMethodWithOutThatThrows<T>(out List<T> firstFewItems) in /xyz/Exceptions.cs:nn
|
||||
at void Spectre.Console.Tests.Unit.ExceptionTests.<>c.<Should_Write_Exception_With_Output_Param>b__5_0() in /xyz/ExceptionTests.cs:nn
|
||||
at Exception Spectre.Console.Tests.Unit.ExceptionTests.GetException(Action action) in /xyz/ExceptionTests.cs:nn
|
||||
@@ -0,0 +1,4 @@
|
||||
System.InvalidOperationException: Throwing!
|
||||
at bool MethodThatThrows(int? number) in /xyz/Exceptions.cs:nn
|
||||
at void <Should_Write_Exception_With_Shortened_Methods>b__2_0() in /xyz/ExceptionTests.cs:nn
|
||||
at Exception GetException(Action action) in /xyz/ExceptionTests.cs:nn
|
||||
@@ -0,0 +1,4 @@
|
||||
InvalidOperationException: Throwing!
|
||||
at bool Spectre.Console.Tests.Data.TestExceptions.MethodThatThrows(int? number) in /xyz/Exceptions.cs:nn
|
||||
at void Spectre.Console.Tests.Unit.ExceptionTests.<>c.<Should_Write_Exception_With_Shortened_Types>b__1_0() in /xyz/ExceptionTests.cs:nn
|
||||
at Exception Spectre.Console.Tests.Unit.ExceptionTests.GetException(Action action) in /xyz/ExceptionTests.cs:nn
|
||||
@@ -0,0 +1,5 @@
|
||||
InvalidOperationException: Throwing!
|
||||
at bool Spectre.Console.Tests.Data.TestExceptions.MethodThatThrows(int? number) in /xyz/Exceptions.cs:nn
|
||||
at (string Key, List<T> Values) Spectre.Console.Tests.Data.TestExceptions.GetTuplesWithInnerException<T>((int First, string Second) myValue) in /xyz/Exceptions.cs:nn
|
||||
at void Spectre.Console.Tests.Unit.ExceptionTests.<>c.<Should_Write_Exception_With_Tuple_Return>b__6_0() in /xyz/ExceptionTests.cs:nn
|
||||
at Exception Spectre.Console.Tests.Unit.ExceptionTests.GetException(Action action) in /xyz/ExceptionTests.cs:nn
|
||||
@@ -0,0 +1,5 @@
|
||||
|
||||
foo ━━ 0% --:--:-- ⣷
|
||||
bar ━━ 0% --:--:-- ⣷
|
||||
baz ━━ 0% --:--:-- ⣷
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
[?25l
|
||||
[38;5;11m*[0m foo
|
||||
|
||||
[2A
|
||||
[38;5;11m-[0m bar
|
||||
|
||||
[2A
|
||||
[38;5;11m*[0m baz
|
||||
|
||||
[2K[1A[2K[1A[2K[?25h
|
||||
@@ -0,0 +1 @@
|
||||
Favorite fruit? [Banana/Orange] (Banana): Orange
|
||||
@@ -0,0 +1 @@
|
||||
Favorite fruit? [Banana/Bandana/Orange]: Band Bandana
|
||||
@@ -0,0 +1 @@
|
||||
Favorite fruit? [Banana/Orange] (Banana): Banana
|
||||
@@ -0,0 +1 @@
|
||||
Favorite fruit? [Apple/Banana/Orange]: Apple Banana
|
||||
@@ -0,0 +1 @@
|
||||
Favorite fruit? [Banana/Bandana/Orange]: Ban Banana Bandana Banana
|
||||
@@ -0,0 +1 @@
|
||||
Enter Value: [38;5;12m[Choice 1/Choice 2][0m: Choice 2
|
||||
@@ -0,0 +1 @@
|
||||
Enter Value: [38;5;9m[Choice 1/Choice 2][0m: Choice 2
|
||||
@@ -0,0 +1,5 @@
|
||||
[
|
||||
Age? ninety-nine,
|
||||
Invalid input,
|
||||
Age? 99
|
||||
]
|
||||
@@ -0,0 +1 @@
|
||||
Favorite fruit? [Apple/Banana]: Banana
|
||||
@@ -0,0 +1,7 @@
|
||||
Guess number: 22
|
||||
Too low
|
||||
Guess number: 102
|
||||
Too high
|
||||
Guess number: ABC
|
||||
Invalid input
|
||||
Guess number: 99
|
||||
@@ -0,0 +1 @@
|
||||
Favorite fruit? [Banana/Orange] (Banana): Banana
|
||||
@@ -0,0 +1 @@
|
||||
Enter Value: [38;5;2m(default)[0m: Input
|
||||
@@ -0,0 +1 @@
|
||||
Enter Value: [38;5;9m(default)[0m: Input
|
||||
@@ -0,0 +1,3 @@
|
||||
Favorite fruit? [Banana/Orange] (Banana): Apple
|
||||
Please select one of the available options
|
||||
Favorite fruit? [Banana/Orange] (Banana): Banana
|
||||
@@ -0,0 +1 @@
|
||||
Enter command$ Orange
|
||||
@@ -0,0 +1 @@
|
||||
Favorite fruit? (******): ******
|
||||
@@ -0,0 +1 @@
|
||||
Favorite fruit? (------): ------
|
||||
@@ -0,0 +1 @@
|
||||
Favorite fruit? ():
|
||||
@@ -0,0 +1 @@
|
||||
Favorite fruit?
|
||||
@@ -0,0 +1,3 @@
|
||||
+-Greeting----+
|
||||
| Hello World |
|
||||
+-------------+
|
||||
@@ -0,0 +1,3 @@
|
||||
╔═Greeting════╗
|
||||
║ Hello World ║
|
||||
╚═════════════╝
|
||||
@@ -0,0 +1,3 @@
|
||||
┏━Greeting━━━━┓
|
||||
┃ Hello World ┃
|
||||
┗━━━━━━━━━━━━━┛
|
||||
@@ -0,0 +1 @@
|
||||
Hello World
|
||||
@@ -0,0 +1,2 @@
|
||||
Greeting
|
||||
Hello World
|
||||
@@ -0,0 +1,3 @@
|
||||
╭─Greeting────╮
|
||||
│ Hello World │
|
||||
╰─────────────╯
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user