Skip to content

Commit

Permalink
Add unit test files and update InlineData for new cultures.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tolitech committed Jan 2, 2025
1 parent a7e5153 commit 808c449
Show file tree
Hide file tree
Showing 7 changed files with 162 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
DESCRIZIONE:
The lion command.

USO:
myapp <TEETH> [LEGS] [OPZIONI] [COMANDO]

ESEMPI:
myapp 20 --alive

ARGOMENTI:
<TEETH> The number of teeth the lion has
[LEGS] The number of legs

OPZIONI:
PREDEFINITO
-h, --help Visualizza le informazioni di aiuto
-a, --alive Indicates whether or not the animal is alive
-n, --name <VALUE>
--agility <VALUE> 10 The agility between 0 and 100
-c <CHILDREN> The number of children the lion has
-d <DAY> Monday, Thursday The days the lion goes hunting
-w, --weight [WEIGHT] The weight of the lion, in kgs

COMANDI:
giraffe <LENGTH> The giraffe command
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
説明:
The lion command.

使用法:
myapp <TEETH> [LEGS] [オプション] [コマンド]

例:
myapp 20 --alive

引数:
<TEETH> The number of teeth the lion has
[LEGS] The number of legs

オプション:
デフォルト
-h, --help ヘルプ情報を表示
-a, --alive Indicates whether or not the animal is alive
-n, --name <VALUE>
--agility <VALUE> 10 The agility between 0 and 100
-c <CHILDREN> The number of children the lion has
-d <DAY> Monday, Thursday The days the lion goes hunting
-w, --weight [WEIGHT] The weight of the lion, in kgs

コマンド群:
giraffe <LENGTH> The giraffe command
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
설명:
The lion command.

사용법:
myapp <TEETH> [LEGS] [옵션] [명령]

예시:
myapp 20 --alive

인수:
<TEETH> The number of teeth the lion has
[LEGS] The number of legs

옵션:
기본값
-h, --help 도움말 정보를 출력
-a, --alive Indicates whether or not the animal is alive
-n, --name <VALUE>
--agility <VALUE> 10 The agility between 0 and 100
-c <CHILDREN> The number of children the lion has
-d <DAY> Monday, Thursday The days the lion goes hunting
-w, --weight [WEIGHT] The weight of the lion, in kgs

명령어:
giraffe <LENGTH> The giraffe command
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
DESCRIÇÃO:
The lion command.

USO:
myapp <TEETH> [LEGS] [OPÇÕES] [COMANDO]

EXEMPLOS:
myapp 20 --alive

ARGUMENTOS:
<TEETH> The number of teeth the lion has
[LEGS] The number of legs

OPÇÕES:
PADRÃO
-h, --help Exibe informações de ajuda
-a, --alive Indicates whether or not the animal is alive
-n, --name <VALUE>
--agility <VALUE> 10 The agility between 0 and 100
-c <CHILDREN> The number of children the lion has
-d <DAY> Monday, Thursday The days the lion goes hunting
-w, --weight [WEIGHT] The weight of the lion, in kgs

COMANDOS:
giraffe <LENGTH> The giraffe command
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
ОПИСАНИЕ:
The lion command.

ИСПОЛЬЗОВАНИЕ:
myapp <TEETH> [LEGS] [ОПЦИИ] [КОМАНДА]

ПРИМЕРЫ:
myapp 20 --alive

АРГУМЕНТЫ:
<TEETH> The number of teeth the lion has
[LEGS] The number of legs

ОПЦИИ:
ПО УМОЛЧАНИЮ
-h, --help Выводит информацию о помощи
-a, --alive Indicates whether or not the animal is alive
-n, --name <VALUE>
--agility <VALUE> 10 The agility between 0 and 100
-c <CHILDREN> The number of children the lion has
-d <DAY> Monday, Thursday The days the lion goes hunting
-w, --weight [WEIGHT] The weight of the lion, in kgs

КОМАНДЫ:
giraffe <LENGTH> The giraffe command
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
描述:
The lion command.

用法:
myapp <TEETH> [LEGS] [选项] [命令]

示例:
myapp 20 --alive

参数:
<TEETH> The number of teeth the lion has
[LEGS] The number of legs

选项:
默认
-h, --help 显示帮助信息
-a, --alive Indicates whether or not the animal is alive
-n, --name <VALUE>
--agility <VALUE> 10 The agility between 0 and 100
-c <CHILDREN> The number of children the lion has
-d <DAY> Monday, Thursday The days the lion goes hunting
-w, --weight [WEIGHT] The weight of the lion, in kgs

命令列表:
giraffe <LENGTH> The giraffe command
12 changes: 12 additions & 0 deletions src/Tests/Spectre.Console.Cli.Tests/Unit/CommandAppTests.Help.cs
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,18 @@ public Task Should_Output_Default_Command_When_Command_Has_Required_Parameters_A
[InlineData("sv-SE", "SV")]
[InlineData("de", "DE")]
[InlineData("de-DE", "DE")]
[InlineData("it", "IT")]
[InlineData("it-IT", "IT")]
[InlineData("ja", "JA")]
[InlineData("ja-JP", "JA")]
[InlineData("ko", "KO")]
[InlineData("ko-KR", "KO")]
[InlineData("pt", "PT")]
[InlineData("pt-BR", "PT")]
[InlineData("ru", "RU")]
[InlineData("ru-RU", "RU")]
[InlineData("zh-Hans", "ZH-HANS")]
[InlineData("zh-Hans-CN", "ZH-HANS")]
[Expectation("Default_Without_Args_Additional")]
public Task Should_Output_Default_Command_And_Additional_Commands_When_Default_Command_Has_Required_Parameters_And_Is_Called_Without_Args_Localised(string culture, string expectationPrefix)
{
Expand Down

0 comments on commit 808c449

Please sign in to comment.