mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-19 13:28:16 +08:00
Moved analyzer tests to its own project
Also moves tests to `./test` which makes it possible for all test projects to share the same .editorconfig files and similar.
This commit is contained in:
@ -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,3 @@
|
||||
╭─Greeting────╮
|
||||
│ Hello World │
|
||||
╰─────────────╯
|
@ -0,0 +1,3 @@
|
||||
┌─Greeting────┐
|
||||
│ Hello World │
|
||||
└─────────────┘
|
@ -0,0 +1,8 @@
|
||||
+----------+----------+
|
||||
| Header 1 | Header 2 |
|
||||
|----------+----------|
|
||||
| Cell | Cell |
|
||||
| Cell | Cell |
|
||||
|----------+----------|
|
||||
| Footer 1 | Footer 2 |
|
||||
+----------+----------+
|
@ -0,0 +1,8 @@
|
||||
+---------------------+
|
||||
| Header 1 | Header 2 |
|
||||
|----------+----------|
|
||||
| Cell | Cell |
|
||||
| Cell | Cell |
|
||||
|----------+----------|
|
||||
| Footer 1 | Footer 2 |
|
||||
+---------------------+
|
@ -0,0 +1,8 @@
|
||||
+----------+----------+
|
||||
| Header 1 | Header 2 |
|
||||
|==========+==========|
|
||||
| Cell | Cell |
|
||||
| Cell | Cell |
|
||||
+----------+----------+
|
||||
| Footer 1 | Footer 2 |
|
||||
+----------+----------+
|
@ -0,0 +1,8 @@
|
||||
╔══════════╦══════════╗
|
||||
║ Header 1 ║ Header 2 ║
|
||||
╠══════════╬══════════╣
|
||||
║ Cell ║ Cell ║
|
||||
║ Cell ║ Cell ║
|
||||
╠══════════╬══════════╣
|
||||
║ Footer 1 ║ Footer 2 ║
|
||||
╚══════════╩══════════╝
|
@ -0,0 +1,8 @@
|
||||
╔══════════╤══════════╗
|
||||
║ Header 1 │ Header 2 ║
|
||||
╟──────────┼──────────╢
|
||||
║ Cell │ Cell ║
|
||||
║ Cell │ Cell ║
|
||||
╟──────────┼──────────╢
|
||||
║ Footer 1 │ Footer 2 ║
|
||||
╚══════════╧══════════╝
|
@ -0,0 +1,8 @@
|
||||
┏━━━━━━━━━━┳━━━━━━━━━━┓
|
||||
┃ Header 1 ┃ Header 2 ┃
|
||||
┣━━━━━━━━━━╋━━━━━━━━━━┫
|
||||
┃ Cell ┃ Cell ┃
|
||||
┃ Cell ┃ Cell ┃
|
||||
┣━━━━━━━━━━╋━━━━━━━━━━┫
|
||||
┃ Footer 1 ┃ Footer 2 ┃
|
||||
┗━━━━━━━━━━┻━━━━━━━━━━┛
|
@ -0,0 +1,8 @@
|
||||
┏━━━━━━━━━━┯━━━━━━━━━━┓
|
||||
┃ Header 1 │ Header 2 ┃
|
||||
┠──────────┼──────────┨
|
||||
┃ Cell │ Cell ┃
|
||||
┃ Cell │ Cell ┃
|
||||
┠──────────┼──────────┨
|
||||
┃ Footer 1 │ Footer 2 ┃
|
||||
┗━━━━━━━━━━┷━━━━━━━━━━┛
|
@ -0,0 +1,8 @@
|
||||
┏━━━━━━━━━━┳━━━━━━━━━━┓
|
||||
┃ Header 1 ┃ Header 2 ┃
|
||||
┡━━━━━━━━━━╇━━━━━━━━━━┩
|
||||
│ Cell │ Cell │
|
||||
│ Cell │ Cell │
|
||||
├──────────┼──────────┤
|
||||
│ Footer 1 │ Footer 2 │
|
||||
└──────────┴──────────┘
|
@ -0,0 +1,8 @@
|
||||
───────────────────────
|
||||
Header 1 Header 2
|
||||
───────────────────────
|
||||
Cell Cell
|
||||
Cell Cell
|
||||
───────────────────────
|
||||
Footer 1 Footer 2
|
||||
───────────────────────
|
@ -0,0 +1,7 @@
|
||||
|
||||
| Header 1 | Header 2 |
|
||||
| -------- | -------- |
|
||||
| Cell | Cell |
|
||||
| Cell | Cell |
|
||||
| Footer 1 | Footer 2 |
|
||||
|
@ -0,0 +1,7 @@
|
||||
|
||||
| Header 1 | Header 2 |
|
||||
| -------- | :------: |
|
||||
| Cell | Cell |
|
||||
| Cell | Cell |
|
||||
| Footer 1 | Footer 2 |
|
||||
|
@ -0,0 +1,7 @@
|
||||
|
||||
| Header 1 | Header 2 |
|
||||
| -------- | :------- |
|
||||
| Cell | Cell |
|
||||
| Cell | Cell |
|
||||
| Footer 1 | Footer 2 |
|
||||
|
@ -0,0 +1,7 @@
|
||||
|
||||
| Header 1 | Header 2 |
|
||||
| -------- | -------: |
|
||||
| Cell | Cell |
|
||||
| Cell | Cell |
|
||||
| Footer 1 | Footer 2 |
|
||||
|
@ -0,0 +1,8 @@
|
||||
|
||||
Header 1 │ Header 2
|
||||
──────────┼──────────
|
||||
Cell │ Cell
|
||||
Cell │ Cell
|
||||
──────────┼──────────
|
||||
Footer 1 │ Footer 2
|
||||
|
@ -0,0 +1,8 @@
|
||||
|
||||
Header 1 │ Header 2
|
||||
══════════╪══════════
|
||||
Cell │ Cell
|
||||
Cell │ Cell
|
||||
══════════╪══════════
|
||||
Footer 1 │ Footer 2
|
||||
|
@ -0,0 +1,8 @@
|
||||
|
||||
Header 1 │ Header 2
|
||||
━━━━━━━━━━┿━━━━━━━━━━
|
||||
Cell │ Cell
|
||||
Cell │ Cell
|
||||
━━━━━━━━━━┿━━━━━━━━━━
|
||||
Footer 1 │ Footer 2
|
||||
|
@ -0,0 +1,4 @@
|
||||
Header 1 Header 2
|
||||
Cell Cell
|
||||
Cell Cell
|
||||
Footer 1 Footer 2
|
@ -0,0 +1,8 @@
|
||||
╭──────────┬──────────╮
|
||||
│ Header 1 │ Header 2 │
|
||||
├──────────┼──────────┤
|
||||
│ Cell │ Cell │
|
||||
│ Cell │ Cell │
|
||||
├──────────┼──────────┤
|
||||
│ Footer 1 │ Footer 2 │
|
||||
╰──────────┴──────────╯
|
@ -0,0 +1,8 @@
|
||||
|
||||
Header 1 Header 2
|
||||
───────────────────────
|
||||
Cell Cell
|
||||
Cell Cell
|
||||
───────────────────────
|
||||
Footer 1 Footer 2
|
||||
|
@ -0,0 +1,8 @@
|
||||
|
||||
Header 1 Header 2
|
||||
━━━━━━━━━━━━━━━━━━━━━━━
|
||||
Cell Cell
|
||||
Cell Cell
|
||||
━━━━━━━━━━━━━━━━━━━━━━━
|
||||
Footer 1 Footer 2
|
||||
|
@ -0,0 +1,8 @@
|
||||
┌──────────┬──────────┐
|
||||
│ Header 1 │ Header 2 │
|
||||
├──────────┼──────────┤
|
||||
│ Cell │ Cell │
|
||||
│ Cell │ Cell │
|
||||
├──────────┼──────────┤
|
||||
│ Footer 1 │ Footer 2 │
|
||||
└──────────┴──────────┘
|
@ -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,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,3 @@
|
||||
# Raw
|
||||
/c
|
||||
set && pause
|
@ -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,4 @@
|
||||
Error: Encountered unterminated quoted string 'Rufus'.
|
||||
|
||||
--name "Rufus
|
||||
^^^^^^ Did you forget the closing quotation mark?
|
@ -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 Spectre.Console.Tests.Data.TestExceptions.GenericMethodThatThrows[[T0,T1,TRet]](Nullable`1 number) in /xyz/Exceptions.cs:nn
|
||||
at Spectre.Console.Tests.Data.TestExceptions.ThrowWithGenericInnerException() in /xyz/Exceptions.cs:nn
|
||||
at Spectre.Console.Tests.Data.TestExceptions.ThrowWithGenericInnerException() in /xyz/Exceptions.cs:nn
|
||||
at 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 Spectre.Console.Tests.Unit.ExceptionTests.GetException(Action action) in /xyz/ExceptionTests.cs:nn
|
@ -0,0 +1,4 @@
|
||||
System.InvalidOperationException: Throwing!
|
||||
at Spectre.Console.Tests.Data.TestExceptions.MethodThatThrows(Nullable`1 number) in /xyz/Exceptions.cs:nn
|
||||
at Spectre.Console.Tests.Unit.ExceptionTests.<>c.<Should_Write_Exception>b__0_0() in /xyz/ExceptionTests.cs:nn
|
||||
at 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 Spectre.Console.Tests.Data.TestExceptions.MethodThatThrows(Nullable`1 number) in /xyz/Exceptions.cs:nn
|
||||
at Spectre.Console.Tests.Data.TestExceptions.ThrowWithInnerException() in /xyz/Exceptions.cs:nn
|
||||
at Spectre.Console.Tests.Data.TestExceptions.ThrowWithInnerException() in /xyz/Exceptions.cs:nn
|
||||
at Spectre.Console.Tests.Unit.ExceptionTests.<>c.<Should_Write_Exception_With_Inner_Exception>b__3_0() in /xyz/ExceptionTests.cs:nn
|
||||
at Spectre.Console.Tests.Unit.ExceptionTests.GetException(Action action) in /xyz/ExceptionTests.cs:nn
|
@ -0,0 +1,4 @@
|
||||
System.InvalidOperationException: Throwing!
|
||||
at MethodThatThrows(Nullable`1 number) in /xyz/Exceptions.cs:nn
|
||||
at <Should_Write_Exception_With_Shortened_Methods>b__2_0() in /xyz/ExceptionTests.cs:nn
|
||||
at GetException(Action action) in /xyz/ExceptionTests.cs:nn
|
@ -0,0 +1,4 @@
|
||||
InvalidOperationException: Throwing!
|
||||
at Spectre.Console.Tests.Data.TestExceptions.MethodThatThrows(Nullable`1 number) in /xyz/Exceptions.cs:nn
|
||||
at Spectre.Console.Tests.Unit.ExceptionTests.<>c.<Should_Write_Exception_With_Shortened_Types>b__1_0() in /xyz/ExceptionTests.cs:nn
|
||||
at Spectre.Console.Tests.Unit.ExceptionTests.GetException(Action action) in /xyz/ExceptionTests.cs:nn
|
@ -0,0 +1,4 @@
|
||||
Number of fruits
|
||||
Apple ████████ 12
|
||||
Orange █████████████████████████████████████████████████ 54
|
||||
Banana ████████████████████████████ 33
|
@ -0,0 +1,4 @@
|
||||
Number of fruits
|
||||
Apple 0
|
||||
Orange █████████████████████████████████████████████████ 54
|
||||
Banana ████████████████████████████ 33
|
@ -0,0 +1,4 @@
|
||||
[38;5;9m████████████████████████[0m[38;5;12m█████████████████[0m[38;5;2m█████████████[0m[38;5;11m███[0m[38;5;119m███[0m
|
||||
|
||||
[38;5;9m■[0m SCSS [38;5;8m37[0m [38;5;12m■[0m HTML [38;5;8m28.3[0m [38;5;2m■[0m C# [38;5;8m22.6[0m [38;5;11m■[0m JavaScript [38;5;8m6[0m
|
||||
[38;5;119m■[0m Ruby [38;5;8m6[0m [38;5;14m■[0m Shell [38;5;8m0.1[0m
|
@ -0,0 +1,3 @@
|
||||
████████████████████████████████████████████████████████████
|
||||
■ SCSS 37 ■ HTML 28,3 ■ C# 22,6 ■ JavaScript 6
|
||||
■ Ruby 6 ■ Shell 0,1
|
@ -0,0 +1,2 @@
|
||||
████████████████████████████████████████████████████████████████████████████████
|
||||
■ SCSS 37 ■ HTML 28.3 ■ C# 22.6 ■ JavaScript 6 ■ Ruby 6 ■ Shell 0.1
|
@ -0,0 +1,4 @@
|
||||
████████████████████████████████████████████████████████████
|
||||
|
||||
■ SCSS 37 ■ HTML 28.3 ■ C# 22.6 ■ JavaScript 6
|
||||
■ Ruby 6 ■ Shell 0.1
|
@ -0,0 +1,2 @@
|
||||
████████████████████████████████████████████████████████████
|
||||
■ SCSS ■ HTML ■ C# ■ JavaScript ■ Ruby ■ Shell
|
@ -0,0 +1 @@
|
||||
████████████████████████████████████████████████████████████
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user