├── .editorconfig ├── .git-blame-ignore-revs ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── config.yml │ └── feature_request.md ├── funding.yml ├── pull_request_template.md ├── renovate.json └── workflows │ ├── backlog.yaml │ ├── ci.yaml │ ├── publish.yaml │ └── top-issues-dashboard.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE.md ├── NuGet.Config ├── README.fa.md ├── README.jp.md ├── README.md ├── README.pt-BR.md ├── README.zh.md ├── build.cake ├── docs ├── .gitignore ├── Docs.csproj ├── Docs.sln ├── Preview.ps1 ├── Program.cs ├── README.md ├── dotnet-tools.json ├── global.json ├── input │ ├── CNAME │ ├── DOC_TEMPLATE.md │ ├── _ViewImports.cshtml │ ├── _ViewStart.cshtml │ ├── _layout.cshtml │ ├── analyzer │ │ └── rules │ │ │ ├── RULE_TEMPLATE.md │ │ │ ├── Spectre1021.md │ │ │ ├── _ViewStart.cshtml │ │ │ ├── _layout.cshtml │ │ │ ├── index.cshtml │ │ │ ├── spectre1000.md │ │ │ ├── spectre1010.md │ │ │ └── spectre1020.md │ ├── api │ │ ├── Kind │ │ │ ├── _Assembly.cshtml │ │ │ ├── _Event.cshtml │ │ │ ├── _Field.cshtml │ │ │ ├── _Method.cshtml │ │ │ ├── _NamedType.cshtml │ │ │ ├── _Namespace.cshtml │ │ │ └── _Property.cshtml │ │ ├── Sections │ │ │ ├── _Attributes.cshtml │ │ │ ├── _ConstantValue.cshtml │ │ │ ├── _ConstantValue.cshtml.cs │ │ │ ├── _Constructors.cshtml │ │ │ ├── _DocumentList.cshtml │ │ │ ├── _Events.cshtml │ │ │ ├── _Examples.cshtml │ │ │ ├── _ExtensionMethods.cshtml │ │ │ ├── _Fields.cshtml │ │ │ ├── _Methods.cshtml │ │ │ ├── _Operators.cshtml │ │ │ ├── _Parameters.cshtml │ │ │ ├── _Properties.cshtml │ │ │ ├── _Remarks.cshtml │ │ │ ├── _ReturnValue.cshtml │ │ │ ├── _SeeAlso.cshtml │ │ │ ├── _Summary.cshtml │ │ │ ├── _SymbolInfo.cshtml │ │ │ ├── _Syntax.cshtml │ │ │ ├── _TypeParameters.cshtml │ │ │ └── _Value.cshtml │ │ ├── _layout.cshtml │ │ └── index.cshtml │ ├── appendix │ │ ├── borders.md │ │ ├── colors.md │ │ ├── emojis.md │ │ ├── index.cshtml │ │ ├── spinners.md │ │ └── styles.md │ ├── assets │ │ ├── CascadiaMonoPL.woff2 │ │ ├── casts │ │ │ ├── align-rich.cast │ │ │ ├── await-spinner-plain.cast │ │ │ ├── await-spinner-rich.cast │ │ │ ├── bar-chart-plain.cast │ │ │ ├── bar-chart-rich.cast │ │ │ ├── breakdown-chart-plain.cast │ │ │ ├── breakdown-chart-rich.cast │ │ │ ├── calendar-culture-plain.cast │ │ │ ├── calendar-culture-rich.cast │ │ │ ├── calendar-header-plain.cast │ │ │ ├── calendar-header-rich.cast │ │ │ ├── calendar-highlight-plain.cast │ │ │ ├── calendar-highlight-rich.cast │ │ │ ├── calendar-plain.cast │ │ │ ├── calendar-rich.cast │ │ │ ├── canvas-image-manipulation-plain.cast │ │ │ ├── canvas-image-manipulation-rich.cast │ │ │ ├── canvas-image-plain.cast │ │ │ ├── canvas-image-rich.cast │ │ │ ├── canvas-plain.cast │ │ │ ├── canvas-rich.cast │ │ │ ├── columns-plain.cast │ │ │ ├── columns-rich.cast │ │ │ ├── custom-colors-exception-plain.cast │ │ │ ├── custom-colors-exception-rich.cast │ │ │ ├── default-exception-plain.cast │ │ │ ├── default-exception-rich.cast │ │ │ ├── figlet-plain.cast │ │ │ ├── figlet-rich.cast │ │ │ ├── grid-rich.cast │ │ │ ├── input-plain.cast │ │ │ ├── input-rich.cast │ │ │ ├── json-plain.cast │ │ │ ├── json-rich.cast │ │ │ ├── layout-plain.cast │ │ │ ├── layout-rich.cast │ │ │ ├── live-plain.cast │ │ │ ├── live-rich.cast │ │ │ ├── multi-selection-plain.cast │ │ │ ├── multi-selection-rich.cast │ │ │ ├── padder-rich.cast │ │ │ ├── panel-plain.cast │ │ │ ├── panel-rich.cast │ │ │ ├── progress-non-interactive.cast │ │ │ ├── progress-plain.cast │ │ │ ├── progress-rich.cast │ │ │ ├── rows-rich.cast │ │ │ ├── rule-plain.cast │ │ │ ├── rule-rich.cast │ │ │ ├── selection-plain.cast │ │ │ ├── selection-rich.cast │ │ │ ├── shortened-exception-plain.cast │ │ │ ├── shortened-exception-rich.cast │ │ │ ├── status-plain.cast │ │ │ ├── status-rich.cast │ │ │ ├── table-plain.cast │ │ │ ├── table-rich.cast │ │ │ ├── text-path-plain.cast │ │ │ ├── text-path-rich.cast │ │ │ ├── tree-plain.cast │ │ │ └── tree-rich.cast │ │ ├── favicons │ │ │ ├── apple-touch-icon.png │ │ │ ├── favicon-16x16.png │ │ │ └── favicon-32x32.png │ │ ├── images │ │ │ ├── barchart.png │ │ │ ├── borders │ │ │ │ ├── panel.png │ │ │ │ └── table.png │ │ │ ├── compact_exception.png │ │ │ ├── custom_exception.png │ │ │ ├── example.png │ │ │ ├── exception.png │ │ │ ├── multiselection.gif │ │ │ ├── progress.gif │ │ │ ├── progress.png │ │ │ ├── progress_fallback.png │ │ │ ├── rule.png │ │ │ ├── selection.gif │ │ │ ├── status.gif │ │ │ ├── table.gif │ │ │ ├── table.mp4 │ │ │ ├── table.png │ │ │ ├── table.webm │ │ │ └── tree.png │ │ ├── logo.svg │ │ └── styles.css │ ├── best-practices.md │ ├── blog │ │ ├── _category.yaml │ │ ├── _directory.yaml │ │ ├── _index.yaml │ │ ├── _nextprevious.cshtml │ │ ├── _posts.cshtml │ │ ├── category.cshtml │ │ ├── index.cshtml │ │ └── posts │ │ │ ├── 2021-07-11-hello-world.md │ │ │ ├── 2021-07-19-spectre-console-0.41-released.md │ │ │ ├── 2021-12-16-spectre-console-0.43-released.md │ │ │ ├── 2022-03-27-spectre-console-0.44-released.md │ │ │ ├── 2022-09-10-spectre-console-0.45-released.md │ │ │ ├── 2023-01-10-spectre-console-0.46-released.md │ │ │ ├── 2023-05-19-spectre-console-0.47-released.md │ │ │ ├── 2023-11-22-spectre-console-0.48-released.md │ │ │ ├── 2024-04-23-spectre-console-0.49-released.md │ │ │ ├── 2025-04-08-spectre-console-0.50-released.md │ │ │ ├── BLOG_TEMPLATE.md │ │ │ ├── _ViewStart.cshtml │ │ │ └── _layout.cshtml │ ├── cli │ │ ├── command-help.md │ │ ├── commandApp.md │ │ ├── commands.md │ │ ├── composing.md │ │ ├── exceptions.md │ │ ├── getting-started.md │ │ ├── index.cshtml │ │ ├── introduction.md │ │ ├── migration.md │ │ ├── settings.md │ │ └── unit-testing.md │ ├── exceptions.md │ ├── favicon.ico │ ├── index.md │ ├── live │ │ ├── async.md │ │ ├── index.cshtml │ │ ├── live-display.md │ │ ├── progress.md │ │ └── status.md │ ├── markup.md │ ├── postcss.config.js │ ├── prompts │ │ ├── index.cshtml │ │ ├── multiselection.md │ │ ├── selection.md │ │ └── text.md │ ├── quick-start.md │ ├── sponsors.md │ ├── tailwind.config.js │ ├── tailwind.css │ └── widgets │ │ ├── align.md │ │ ├── barchart.md │ │ ├── breakdownchart.md │ │ ├── calendar.md │ │ ├── canvas-image.md │ │ ├── canvas.md │ │ ├── columns.md │ │ ├── figlet.md │ │ ├── grid.md │ │ ├── index.cshtml │ │ ├── json.md │ │ ├── layout.md │ │ ├── padder.md │ │ ├── panel.md │ │ ├── rows.md │ │ ├── rule.md │ │ ├── table.md │ │ ├── text-path.md │ │ └── tree.md ├── package-lock.json ├── package.json └── src │ ├── Constants.cs │ ├── Data │ └── emojis.json │ ├── Extensions │ ├── BootstrapperExtensions.cs │ ├── DocumentExtensions.cs │ ├── IExecutionContextExtensions.cs │ └── StringExtensions.cs │ ├── Models │ ├── Color.cs │ ├── ColorModel.cs │ └── Emoji.cs │ ├── Modules │ └── ReadEmbedded.cs │ ├── Pipelines │ ├── CodePipeline.cs │ ├── ColorsPipeline.cs │ ├── DeploymentPipeline.cs │ ├── EmojiPipeline.cs │ └── SocialCardPipeline.cs │ ├── Shortcodes │ ├── AlertShortcode.cs │ ├── AsciicastShortcode.cs │ ├── ChildrenShortcode.cs │ ├── ColorTableShortcode.cs │ ├── EmojiTableShortcode.cs │ ├── ExampleSnippet.cs │ └── InfoShortcode.cs │ ├── SocialCards │ ├── CascadiaCodePL.woff2 │ ├── index.cshtml │ ├── index.cshtml.cs │ └── styles.css │ └── Utilities │ ├── HighlightService.cs │ ├── TypeNameLinks.cs │ └── VersionUtilities.cs ├── dotnet-tools.json ├── global.json ├── resources ├── gfx │ ├── large-logo.png │ ├── medium-logo.png │ └── small-logo.png ├── nuget │ ├── Spectre.Console.Cli.md │ ├── Spectre.Console.ImageSharp.md │ ├── Spectre.Console.Json.md │ ├── Spectre.Console.Testing.md │ ├── Spectre.Console.md │ └── logo.png ├── scripts │ ├── .gitignore │ ├── Generate-Colors.ps1 │ ├── Generate-Emoji.ps1 │ ├── Generate-Samples.ps1 │ ├── Generate-Spinners.ps1 │ └── Generator │ │ ├── Commands │ │ ├── AsciiCast │ │ │ ├── AnsiConsoleExtensions.cs │ │ │ ├── AsciiCastConsole.cs │ │ │ ├── AsciiCastExtensions.cs │ │ │ ├── AsciiCastInput.cs │ │ │ ├── AsciiCastOut.cs │ │ │ └── Samples │ │ │ │ ├── AwaitSpinnerSample.cs │ │ │ │ ├── BarChartSample.cs │ │ │ │ ├── BaseSample.cs │ │ │ │ ├── BreakdownChartSample.cs │ │ │ │ ├── CalendarSamples.cs │ │ │ │ ├── CanvasImageSample.cs │ │ │ │ ├── CanvasSample.cs │ │ │ │ ├── ColumnsSample.cs │ │ │ │ ├── Exceptions.cs │ │ │ │ ├── FigletSample.cs │ │ │ │ ├── InputSample.cs │ │ │ │ ├── JsonSample.cs │ │ │ │ ├── LayoutSample.cs │ │ │ │ ├── LiveSample.cs │ │ │ │ ├── MultiSelectionSample.cs │ │ │ │ ├── PanelSample.cs │ │ │ │ ├── ProgressSample.cs │ │ │ │ ├── RuleSample.cs │ │ │ │ ├── SelectionSample.cs │ │ │ │ ├── StatusSample.cs │ │ │ │ ├── TableSample.cs │ │ │ │ ├── TextPathSample.cs │ │ │ │ └── TreeSample.cs │ │ ├── ColorGeneratorCommand.cs │ │ ├── EmojiGeneratorCommand.cs │ │ ├── GeneratorSettings.cs │ │ ├── SampleCommand.cs │ │ └── SpinnerGeneratorCommand.cs │ │ ├── Data │ │ ├── colors.json │ │ ├── spinners_default.json │ │ └── spinners_sindresorhus.json │ │ ├── Generator.csproj │ │ ├── Generator.sln │ │ ├── Models │ │ ├── Color.cs │ │ ├── ColorModel.cs │ │ ├── Emoji.cs │ │ ├── Palette.cs │ │ └── Spinner.cs │ │ ├── Program.cs │ │ └── Templates │ │ ├── Color.Generated.template │ │ ├── ColorPalette.Generated.template │ │ ├── ColorTable.Generated.template │ │ ├── Emoji.Generated.template │ │ ├── Emoji.Json.template │ │ └── Spinner.Generated.template └── spectre.snk └── src ├── .editorconfig ├── Directory.Build.props ├── Directory.Build.targets ├── Directory.Packages.props ├── Extensions ├── Spectre.Console.ImageSharp │ ├── CanvasImage.cs │ ├── CanvasImageExtensions.cs │ └── Spectre.Console.ImageSharp.csproj └── Spectre.Console.Json │ ├── IJsonParser.cs │ ├── JsonBuilder.cs │ ├── JsonParser.cs │ ├── JsonText.cs │ ├── JsonTextExtensions.cs │ ├── JsonTextStyles.cs │ ├── JsonToken.cs │ ├── JsonTokenReader.cs │ ├── JsonTokenType.cs │ ├── JsonTokenizer.cs │ ├── Properties │ └── Usings.cs │ ├── Spectre.Console.Json.csproj │ └── Syntax │ ├── JsonArray.cs │ ├── JsonBoolean.cs │ ├── JsonMember.cs │ ├── JsonNull.cs │ ├── JsonNumber.cs │ ├── JsonObject.cs │ ├── JsonString.cs │ ├── JsonSyntax.cs │ └── JsonSyntaxVisitor.cs ├── Spectre.Console.Cli ├── Annotations │ ├── CommandArgumentAttribute.cs │ ├── CommandOptionAttribute.cs │ ├── PairDeconstructorAttribute.cs │ ├── ParameterValidationAttribute.cs │ └── ParameterValueProviderAttribute.cs ├── AsyncCommand.cs ├── AsyncCommandOfT.cs ├── CaseSensitivity.cs ├── Command.cs ├── CommandApp.cs ├── CommandAppException.cs ├── CommandAppOfT.cs ├── CommandConfigurationException.cs ├── CommandContext.cs ├── CommandOfT.cs ├── CommandParameterContext.cs ├── CommandParseException.cs ├── CommandRuntimeException.cs ├── CommandSettings.cs ├── CommandTemplateException.cs ├── ConfiguratorExtensions.cs ├── EmptyCommandSettings.cs ├── FlagValue.cs ├── Help │ ├── HelpProvider.cs │ ├── HelpProviderResources.cs │ ├── HelpProviderStyles.cs │ ├── ICommandArgument.cs │ ├── ICommandContainer.cs │ ├── ICommandInfo.cs │ ├── ICommandInfoExtensions.cs │ ├── ICommandModel.cs │ ├── ICommandOption.cs │ ├── ICommandParameter.cs │ └── IHelpProvider.cs ├── IBranchConfigurator.cs ├── ICommand.cs ├── ICommandApp.cs ├── ICommandAppSettings.cs ├── ICommandConfigurator.cs ├── ICommandInterceptor.cs ├── ICommandLimiterOfT.cs ├── ICommandOfT.cs ├── ICommandParameterInfo.cs ├── IConfigurator.cs ├── IConfiguratorOfT.cs ├── IFlagValue.cs ├── IRemainingArguments.cs ├── ITypeRegistrar.cs ├── ITypeRegistrarFrontend.cs ├── ITypeResolver.cs ├── Internal │ ├── Binding │ │ ├── CommandConstructorBinder.cs │ │ ├── CommandPropertyBinder.cs │ │ ├── CommandValueBinder.cs │ │ ├── CommandValueLookup.cs │ │ └── CommandValueResolver.cs │ ├── Collections │ │ ├── IMultiMap.cs │ │ └── MultiMap.cs │ ├── CommandBinder.cs │ ├── CommandExecutor.cs │ ├── CommandPart.cs │ ├── CommandSuggestor.cs │ ├── CommandValidator.cs │ ├── Commands │ │ ├── ExplainCommand.cs │ │ ├── VersionCommand.cs │ │ └── XmlDocCommand.cs │ ├── Composer.cs │ ├── Composition │ │ ├── Activators.cs │ │ ├── ComponentRegistration.cs │ │ ├── ComponentRegistry.cs │ │ ├── DefaultTypeRegistrar.cs │ │ └── DefaultTypeResolver.cs │ ├── Configuration │ │ ├── BranchConfigurator.cs │ │ ├── CommandAppSettings.cs │ │ ├── CommandConfigurator.cs │ │ ├── ConfigurationHelper.cs │ │ ├── Configurator.cs │ │ ├── ConfiguratorOfT.cs │ │ ├── ConfiguredCommand.cs │ │ ├── DefaultCommandConfigurator.cs │ │ ├── IConfiguration.cs │ │ ├── TemplateParser.cs │ │ ├── TemplateToken.cs │ │ └── TemplateTokenizer.cs │ ├── Constants.cs │ ├── DefaultPairDeconstructor.cs │ ├── DelegateCommand.cs │ ├── Exceptions │ │ ├── CommandLineParseExceptionFactory.cs │ │ └── CommandLineTemplateExceptionFactory.cs │ ├── Extensions │ │ ├── AnsiConsoleExtensions.cs │ │ ├── CaseSensitivityExtensions.cs │ │ ├── EnumerableExtensions.cs │ │ ├── ListExtensions.cs │ │ ├── StringExtensions.cs │ │ ├── TypeExtensions.cs │ │ ├── TypeRegistrarExtensions.cs │ │ └── XmlElementExtensions.cs │ ├── IPairDeconstructor.cs │ ├── Modelling │ │ ├── CommandArgument.cs │ │ ├── CommandContainerExtensions.cs │ │ ├── CommandInfo.cs │ │ ├── CommandInfoExtensions.cs │ │ ├── CommandModel.cs │ │ ├── CommandModelBuilder.cs │ │ ├── CommandModelValidator.cs │ │ ├── CommandOption.cs │ │ ├── CommandParameter.cs │ │ ├── CommandParameterComparer.cs │ │ ├── ICommandContainer.cs │ │ └── ParameterKind.cs │ ├── Parsing │ │ ├── CommandTree.cs │ │ ├── CommandTreeExtensions.cs │ │ ├── CommandTreeParser.cs │ │ ├── CommandTreeParserContext.cs │ │ ├── CommandTreeParserResult.cs │ │ ├── CommandTreeToken.cs │ │ ├── CommandTreeTokenStream.cs │ │ ├── CommandTreeTokenizer.cs │ │ ├── CommandTreeTokenizerContext.cs │ │ └── MappedCommandParameter.cs │ ├── ParsingMode.cs │ ├── RemainingArguments.cs │ ├── StringWriterWithEncoding.cs │ ├── TextBuffer.cs │ ├── TypeRegistrar.cs │ ├── TypeResolverAdapter.cs │ └── VersionHelper.cs ├── PairDeconstructor.cs ├── Properties │ └── Usings.cs ├── Resources │ ├── HelpProvider.Designer.cs │ ├── HelpProvider.de.resx │ ├── HelpProvider.es.resx │ ├── HelpProvider.fr.resx │ ├── HelpProvider.it.resx │ ├── HelpProvider.ja.resx │ ├── HelpProvider.ko.resx │ ├── HelpProvider.pt.resx │ ├── HelpProvider.resx │ ├── HelpProvider.ru.resx │ ├── HelpProvider.sv.resx │ └── HelpProvider.zh-Hans.resx ├── Spectre.Console.Cli.csproj └── Unsafe │ ├── IUnsafeBranchConfigurator.cs │ ├── IUnsafeConfigurator.cs │ └── UnsafeConfiguratorExtensions.cs ├── Spectre.Console.Testing ├── .editorconfig ├── Cli │ ├── CallbackCommandInterceptor.cs │ ├── CommandAppFailure.cs │ ├── CommandAppResult.cs │ ├── CommandAppTester.cs │ ├── CommandAppTesterSettings.cs │ └── TypeRegistrarBaseTests.cs ├── Extensions │ ├── ShouldlyExtensions.cs │ ├── StringExtensions.cs │ └── StyleExtensions.cs ├── FakeTypeRegistrar.cs ├── FakeTypeResolver.cs ├── Internal │ ├── NoopCursor.cs │ └── NoopExclusivityMode.cs ├── Properties │ └── Usings.cs ├── Spectre.Console.Testing.csproj ├── TestCapabilities.cs ├── TestConsole.cs ├── TestConsoleExtensions.cs └── TestConsoleInput.cs ├── Spectre.Console.sln ├── Spectre.Console ├── AnsiConsole.Exceptions.cs ├── AnsiConsole.Live.cs ├── AnsiConsole.Markup.cs ├── AnsiConsole.Progress.cs ├── AnsiConsole.Prompt.cs ├── AnsiConsole.Recording.cs ├── AnsiConsole.Rendering.cs ├── AnsiConsole.Screen.cs ├── AnsiConsole.State.cs ├── AnsiConsole.Write.cs ├── AnsiConsole.WriteLine.cs ├── AnsiConsole.cs ├── AnsiConsoleFactory.cs ├── AnsiConsoleOutput.cs ├── AnsiConsoleSettings.cs ├── AnsiSupport.cs ├── BoxBorder.Known.cs ├── BoxBorder.cs ├── Capabilities.cs ├── Color.Generated.cs ├── Color.cs ├── ColorSystem.cs ├── ColorSystemSupport.cs ├── CursorDirection.cs ├── Decoration.cs ├── Emoji.Generated.cs ├── Emoji.cs ├── Enrichment │ ├── CI │ │ ├── AppVeyorEnricher.cs │ │ ├── AzurePipelinesEnricher.cs │ │ ├── BambooEnricher.cs │ │ ├── BitbucketEnricher.cs │ │ ├── BitriseEnricher.cs │ │ ├── ContinuaEnricher.cs │ │ ├── GitHubEnricher.cs │ │ ├── GitLabEnricher.cs │ │ ├── GoCDEnricher.cs │ │ ├── JenkinsEnricher.cs │ │ ├── MyGetEnricher.cs │ │ ├── TeamCityEnricher.cs │ │ ├── TfsEnricher.cs │ │ └── TravisEnricher.cs │ ├── ProfileEnricher.cs │ └── ProfileEnrichment.cs ├── Extensions │ ├── Advanced │ │ └── AnsiConsoleExtensions.cs │ ├── AlignExtensions.cs │ ├── AlignableExtensions.cs │ ├── AnsiConsoleExtensions.Async.cs │ ├── AnsiConsoleExtensions.Exceptions.cs │ ├── AnsiConsoleExtensions.Exclusive.cs │ ├── AnsiConsoleExtensions.Input.cs │ ├── AnsiConsoleExtensions.Live.cs │ ├── AnsiConsoleExtensions.Markup.cs │ ├── AnsiConsoleExtensions.Progress.cs │ ├── AnsiConsoleExtensions.Prompt.cs │ ├── AnsiConsoleExtensions.Rendering.cs │ ├── AnsiConsoleExtensions.Screen.cs │ ├── AnsiConsoleExtensions.cs │ ├── BarChartExtensions.cs │ ├── BoxExtensions.cs │ ├── BreakdownChartExtensions.cs │ ├── CalendarExtensions.cs │ ├── CharExtensions.cs │ ├── ColumnExtensions.cs │ ├── ConfirmationPromptExtensions.cs │ ├── CursorExtensions.cs │ ├── DayOfWeekExtensions.cs │ ├── DictionaryExtensions.cs │ ├── ExceptionExtensions.cs │ ├── ExpandableExtensions.cs │ ├── FigletTextExtensions.cs │ ├── GridExtensions.cs │ ├── HasBorderExtensions.cs │ ├── HasBoxBorderExtensions.cs │ ├── HasCultureExtensions.cs │ ├── HasJustificationExtensions.cs │ ├── HasTableBorderExtensions.cs │ ├── HasTreeNodeExtensions.cs │ ├── Int32Extensions.cs │ ├── LayoutExtensions.cs │ ├── ListExtensions.cs │ ├── LiveDisplayExtensions.cs │ ├── OverflowableExtensions.cs │ ├── PaddableExtensions.cs │ ├── PaddingExtensions.cs │ ├── PanelExtensions.cs │ ├── Progress │ │ ├── PercentageColumnExtensions.cs │ │ ├── ProgressBarColumnExtensions.cs │ │ ├── ProgressExtensions.cs │ │ ├── ProgressTaskExtensions.cs │ │ ├── RemainingTimeColumnExtensions.cs │ │ ├── SpinnerColumnExtensions.cs │ │ ├── StatusContextExtensions.cs │ │ └── StatusExtensions.cs │ ├── RecorderExtensions.cs │ ├── RenderOptionsExtensions.cs │ ├── RenderableExtensions.cs │ ├── RuleExtensions.cs │ ├── StackExtensions.cs │ ├── StringBuilderExtensions.cs │ ├── StringExtensions.cs │ ├── StyleExtensions.cs │ ├── TableBorderExtensions.cs │ ├── TableColumnExtensions.cs │ ├── TableExtensions.cs │ ├── TextPathExtensions.cs │ ├── TextWriterExtensions.cs │ ├── TreeExtensions.cs │ ├── TreeGuideExtensions.cs │ ├── TreeNodeExtensions.cs │ └── VisibilityExtensions.cs ├── HorizontalAlignment.cs ├── IAlignable.cs ├── IAnsiConsole.cs ├── IAnsiConsoleCursor.cs ├── IAnsiConsoleInput.cs ├── IAnsiConsoleOutput.cs ├── IColumn.cs ├── IExclusivityMode.cs ├── IExpandable.cs ├── IHasBorder.cs ├── IHasBoxBorder.cs ├── IHasCulture.cs ├── IHasJustification.cs ├── IHasTableBorder.cs ├── IHasTreeNodes.cs ├── IHasVisibility.cs ├── IOverflowable.cs ├── IPaddable.cs ├── IProfileEnricher.cs ├── IReadOnlyCapabilities.cs ├── IRenderable.cs ├── InteractionSupport.cs ├── Internal │ ├── Aligner.cs │ ├── Backends │ │ ├── Ansi │ │ │ ├── AnsiBuilder.cs │ │ │ ├── AnsiColorBuilder.cs │ │ │ ├── AnsiConsoleBackend.cs │ │ │ ├── AnsiConsoleCursor.cs │ │ │ ├── AnsiDecorationBuilder.cs │ │ │ ├── AnsiDetector.cs │ │ │ ├── AnsiLinkHasher.cs │ │ │ └── AnsiSequences.cs │ │ ├── AnsiConsoleFacade.cs │ │ ├── IAnsiConsoleBackend.cs │ │ └── Legacy │ │ │ ├── LegacyConsoleBackend.cs │ │ │ └── LegacyConsoleCursor.cs │ ├── Cell.cs │ ├── Collections │ │ └── ListWithCallback.cs │ ├── Colors │ │ ├── ColorPalette.Generated.cs │ │ ├── ColorPalette.cs │ │ ├── ColorSystemDetector.cs │ │ ├── ColorTable.Generated.cs │ │ └── ColorTable.cs │ ├── ConsoleHelper.cs │ ├── Constants.cs │ ├── DecorationTable.cs │ ├── DefaultExclusivityMode.cs │ ├── DefaultInput.cs │ ├── Extensions │ │ ├── CharExtensions.cs │ │ └── EnumerableExtensions.cs │ ├── FileSize.cs │ ├── FileSizeBase.cs │ ├── FileSizePrefix.cs │ ├── IRatioResolvable.cs │ ├── Polyfill │ │ ├── CancellationToken.cs │ │ ├── EnumHelpers.cs │ │ └── IsExternalInit.cs │ ├── Ratio.cs │ ├── ResourceReader.cs │ ├── Text │ │ ├── Encoding │ │ │ ├── EncoderCapabilities.cs │ │ │ ├── HtmlEncoder.cs │ │ │ └── TextEncoder.cs │ │ ├── Markup │ │ │ ├── MarkupParser.cs │ │ │ ├── MarkupToken.cs │ │ │ ├── MarkupTokenKind.cs │ │ │ └── MarkupTokenizer.cs │ │ └── StringBuffer.cs │ └── TypeConverterHelper.cs ├── Justify.cs ├── Live │ ├── LiveDisplay.cs │ ├── LiveDisplayContext.cs │ ├── LiveDisplayRenderer.cs │ ├── LiveRenderable.cs │ ├── Progress │ │ ├── Columns │ │ │ ├── DownloadedColumn.cs │ │ │ ├── ElapsedTimeColumn.cs │ │ │ ├── PercentageColumn.cs │ │ │ ├── ProgressBarColumn.cs │ │ │ ├── RemainingTimeColumn.cs │ │ │ ├── SpinnerColumn.cs │ │ │ ├── TaskDescriptionColumn.cs │ │ │ └── TransferSpeedColumn.cs │ │ ├── Progress.cs │ │ ├── ProgressColumn.cs │ │ ├── ProgressContext.cs │ │ ├── ProgressRefreshThread.cs │ │ ├── ProgressRenderer.cs │ │ ├── ProgressSample.cs │ │ ├── ProgressTask.cs │ │ ├── ProgressTaskSettings.cs │ │ ├── ProgressTaskState.cs │ │ ├── Renderers │ │ │ ├── DefaultProgressRenderer.cs │ │ │ ├── FallbackProgressRenderer.cs │ │ │ └── FallbackStatusRenderer.cs │ │ ├── Spinner.Generated.cs │ │ └── Spinner.cs │ └── Status │ │ ├── Status.cs │ │ └── StatusContext.cs ├── Overflow.cs ├── Padding.cs ├── Profile.cs ├── Prompts │ ├── ConfirmationPrompt.cs │ ├── DefaultPromptValue.cs │ ├── IMultiSelectionItem.cs │ ├── IPrompt.cs │ ├── ISelectionItem.cs │ ├── List │ │ ├── IListPromptStrategy.cs │ │ ├── ListPrompt.cs │ │ ├── ListPromptConstants.cs │ │ ├── ListPromptInputResult.cs │ │ ├── ListPromptItem.cs │ │ ├── ListPromptRenderHook.cs │ │ ├── ListPromptState.cs │ │ └── ListPromptTree.cs │ ├── MultiSelectionPrompt.cs │ ├── MultiSelectionPromptExtensions.cs │ ├── SelectionPrompt.cs │ ├── SelectionPromptExtensions.cs │ ├── SelectionType.cs │ ├── TextPrompt.cs │ ├── TextPromptExtensions.cs │ └── ValidationResult.cs ├── Properties │ └── Usings.cs ├── Recorder.cs ├── Region.cs ├── Rendering │ ├── Borders │ │ ├── BoxBorderPart.cs │ │ ├── Boxes │ │ │ ├── AsciiBoxBorder.cs │ │ │ ├── DoubleBoxBorder.cs │ │ │ ├── HeavyBoxBorder.cs │ │ │ ├── NoBoxBorder.cs │ │ │ ├── RoundedBoxBorder.cs │ │ │ └── SquareBoxBorder.cs │ │ ├── TableBorderPart.cs │ │ └── Tables │ │ │ ├── Ascii2TableBorder.cs │ │ │ ├── AsciiDoubleHeadTableBorder.cs │ │ │ ├── AsciiTableBorder.cs │ │ │ ├── DoubleEdgeTableBorder.cs │ │ │ ├── DoubleTableBorder.cs │ │ │ ├── HeavyEdgeTableBorder.cs │ │ │ ├── HeavyHeadTableBorder.cs │ │ │ ├── HeavyTableBorder.cs │ │ │ ├── HorizontalTableBorder.cs │ │ │ ├── MarkdownTableBorder.cs │ │ │ ├── MinimalDoubleHeadTableBorder.cs │ │ │ ├── MinimalHeavyHeadTableBorder.cs │ │ │ ├── MinimalTableBorder.cs │ │ │ ├── NoTableBorder.cs │ │ │ ├── RoundedTableBorder.cs │ │ │ ├── SimpleHeavyTableBorder.cs │ │ │ ├── SimpleTableBorder.cs │ │ │ └── SquareTableBorder.cs │ ├── IAnsiConsoleEncoder.cs │ ├── IHasDirtyState.cs │ ├── IRenderHook.cs │ ├── JustInTimeRenderable.cs │ ├── Measurement.cs │ ├── RenderHookScope.cs │ ├── RenderOptions.cs │ ├── RenderPipeline.cs │ ├── Renderable.cs │ ├── Segment.cs │ ├── SegmentLine.cs │ ├── SegmentLineEnumerator.cs │ ├── SegmentLineIterator.cs │ ├── SegmentShape.cs │ ├── TablePart.cs │ ├── Tree │ │ ├── AsciiTreeGuide.cs │ │ ├── BoldLineTreeGuide.cs │ │ ├── DoubleLineTreeGuide.cs │ │ └── LineTreeGuide.cs │ └── TreeGuidePart.cs ├── Size.cs ├── Spectre.Console.csproj ├── Style.cs ├── StyleParser.cs ├── TableBorder.Known.cs ├── TableBorder.cs ├── TreeGuide.Known.cs ├── TreeGuide.cs ├── VerticalAlignment.cs ├── VerticalOverflow.cs ├── VerticalOverflowCropping.cs └── Widgets │ ├── Align.cs │ ├── Calendar.cs │ ├── CalendarEvent.cs │ ├── Canvas.cs │ ├── Charts │ ├── BarChart.cs │ ├── BarChartItem.cs │ ├── BreakdownBar.cs │ ├── BreakdownChart.cs │ ├── BreakdownChartItem.cs │ ├── BreakdownTags.cs │ ├── IBarChartItem.cs │ └── IBreakdownChartItem.cs │ ├── CircularTreeException.cs │ ├── Columns.cs │ ├── ControlCode.cs │ ├── Exceptions │ ├── ExceptionFormat.cs │ ├── ExceptionFormatter.cs │ ├── ExceptionSettings.cs │ ├── ExceptionStyle.cs │ ├── StringUriExtensions.cs │ └── TypeNameHelper.cs │ ├── Figlet │ ├── FigletCharacter.cs │ ├── FigletFont.cs │ ├── FigletFontParser.cs │ ├── FigletHeader.cs │ ├── FigletText.cs │ └── Fonts │ │ └── Standard.flf │ ├── Grid.cs │ ├── GridColumn.cs │ ├── GridRow.cs │ ├── Layout │ ├── Layout.cs │ ├── LayoutPlaceholder.cs │ ├── LayoutRender.cs │ └── LayoutSplitter.cs │ ├── Markup.cs │ ├── Padder.cs │ ├── Panel.cs │ ├── PanelHeader.cs │ ├── Paragraph.cs │ ├── ProgressBar.cs │ ├── Rows.cs │ ├── Rule.cs │ ├── Table │ ├── Table.cs │ ├── TableAccessor.cs │ ├── TableColumn.cs │ ├── TableMeasurer.cs │ ├── TableRenderer.cs │ ├── TableRendererContext.cs │ ├── TableRow.cs │ ├── TableRowCollection.cs │ ├── TableRowEnumerator.cs │ └── TableTitle.cs │ ├── Text.cs │ ├── TextPath.cs │ ├── Tree.cs │ └── TreeNode.cs ├── Tests ├── .editorconfig ├── Directory.Build.props ├── Spectre.Console.Cli.Tests │ ├── Constants.cs │ ├── Data │ │ ├── Commands │ │ │ ├── AnimalCommand.cs │ │ │ ├── AsynchronousCommand.cs │ │ │ ├── CatCommand.cs │ │ │ ├── DogCommand.cs │ │ │ ├── DumpRemainingCommand.cs │ │ │ ├── EmptyCommand.cs │ │ │ ├── GenericCommand.cs │ │ │ ├── GiraffeCommand.cs │ │ │ ├── GreeterCommand.cs │ │ │ ├── HiddenOptionsCommand.cs │ │ │ ├── HorseCommand.cs │ │ │ ├── InvalidCommand.cs │ │ │ ├── LionCommand.cs │ │ │ ├── NoDescriptionCommand.cs │ │ │ ├── OptionVectorCommand.cs │ │ │ ├── ThrowingCommand.cs │ │ │ ├── TurtleCommand.cs │ │ │ └── VersionCommand.cs │ │ ├── Converters │ │ │ ├── CatAgilityConverter.cs │ │ │ └── StringToIntegerConverter.cs │ │ ├── Help │ │ │ ├── CustomHelpProvider.cs │ │ │ ├── RedirectHelpProvider.cs │ │ │ └── RenderMarkupHelpProvider.cs │ │ ├── Settings │ │ │ ├── AnimalSettings.cs │ │ │ ├── ArgumentOrderSettings.cs │ │ │ ├── ArgumentVectorSettings.cs │ │ │ ├── AsynchronousCommandSettings.cs │ │ │ ├── BarCommandSettings.cs │ │ │ ├── CatSettings.cs │ │ │ ├── DogSettings.cs │ │ │ ├── FooSettings.cs │ │ │ ├── GiraffeSettings.cs │ │ │ ├── HiddenOptionSettings.cs │ │ │ ├── HorseSettings.cs │ │ │ ├── InvalidSettings.cs │ │ │ ├── LionSettings.cs │ │ │ ├── MammalSettings.cs │ │ │ ├── MultipleArgumentVectorSettings.cs │ │ │ ├── OptionVectorSettings.cs │ │ │ ├── OptionalArgumentWithDefaultValueSettings.cs │ │ │ ├── ReptileSettings.cs │ │ │ ├── RequiredOptionsSettings.cs │ │ │ ├── StringOptionSettings.cs │ │ │ ├── ThrowingCommandSettings.cs │ │ │ ├── TurtleSettings.cs │ │ │ └── VersionSettings.cs │ │ └── Validators │ │ │ ├── EvenNumberValidatorAttribute.cs │ │ │ └── PositiveNumberValidatorAttribute.cs │ ├── Expectations │ │ ├── Arguments │ │ │ ├── ArgumentCannotContainOptions.Output.verified.txt │ │ │ ├── InvalidCharacterInOptionName.Output.verified.txt │ │ │ ├── InvalidCharacterInValueName.Output.verified.txt │ │ │ ├── LongOptionMustHaveMoreThanOneCharacter.Output.verified.txt │ │ │ ├── MissingLongAndShortName.Output.verified.txt │ │ │ ├── MultipleOptionValuesAreNotSupported.Output.verified.txt │ │ │ ├── MultipleValuesAreNotSupported.Output.verified.txt │ │ │ ├── OptionNamesCannotStartWithDigit.Output.verified.txt │ │ │ ├── OptionsMustHaveName.Output.verified.txt │ │ │ ├── ShortOptionMustOnlyBeOneCharacter.Output.verified.txt │ │ │ ├── UnexpectedCharacter.Output.verified.txt │ │ │ ├── UnterminatedValueName.Output.verified.txt │ │ │ └── ValuesMustHaveName.Output.verified.txt │ │ ├── Help │ │ │ ├── ArgumentOrder.Output.verified.txt │ │ │ ├── Branch.Output.verified.txt │ │ │ ├── Branch_Called_Without_Help.Output.verified.txt │ │ │ ├── Branch_Default_Greeter.Output.verified.txt │ │ │ ├── Branch_Examples.Output.verified.txt │ │ │ ├── Command_Hide_Default.Output.verified.txt │ │ │ ├── Custom_Help_Configured_By_Instance.Output.verified.txt │ │ │ ├── Custom_Help_Configured_By_Type.Output.verified.txt │ │ │ ├── Custom_Help_Registered_By_Instance.Output.verified.txt │ │ │ ├── Custom_Help_Registered_By_Type.Output.verified.txt │ │ │ ├── Default.Output.verified.txt │ │ │ ├── Default_Custom_Help_Provider.Output.verified.txt │ │ │ ├── Default_Examples.Output.verified.txt │ │ │ ├── Default_Greeter.Output.verified.txt │ │ │ ├── Default_Without_Args.Output.verified.txt │ │ │ ├── Default_Without_Args_Additional.Output_DE.verified.txt │ │ │ ├── Default_Without_Args_Additional.Output_EN.verified.txt │ │ │ ├── Default_Without_Args_Additional.Output_FR.verified.txt │ │ │ ├── Default_Without_Args_Additional.Output_IT.verified.txt │ │ │ ├── Default_Without_Args_Additional.Output_JA.verified.txt │ │ │ ├── Default_Without_Args_Additional.Output_KO.verified.txt │ │ │ ├── Default_Without_Args_Additional.Output_PT.verified.txt │ │ │ ├── Default_Without_Args_Additional.Output_RU.verified.txt │ │ │ ├── Default_Without_Args_Additional.Output_SV.verified.txt │ │ │ ├── Default_Without_Args_Additional.Output_ZH-HANS.verified.txt │ │ │ ├── Default_Without_Args_Additional_Style_BoldHeadings.Output.verified.txt │ │ │ ├── Default_Without_Args_Additional_Style_Default.Output.verified.txt │ │ │ ├── Default_Without_Args_Additional_Style_None.Output.verified.txt │ │ │ ├── Description_No_Trailing_Period.Output.verified.txt │ │ │ ├── Hidden_Command_Options.Output.verified.txt │ │ │ ├── Hidden_Commands.Output.verified.txt │ │ │ ├── Leaf.Output.verified.txt │ │ │ ├── NoDescription.Output.verified.txt │ │ │ ├── NoVersion.Output.verified.txt │ │ │ ├── Required_Options.Output.verified.txt │ │ │ ├── Required_Options_No_Description.Output.verified.txt │ │ │ ├── Root.Output.verified.txt │ │ │ ├── Root.QuestionMark.verified.txt │ │ │ ├── Root_Command.Output.verified.txt │ │ │ ├── Root_Command.QuestionMark.verified.txt │ │ │ ├── Root_Examples.Output.verified.txt │ │ │ ├── Root_Examples_Children.Output.verified.txt │ │ │ ├── Root_Examples_Children_Eight.Output.verified.txt │ │ │ ├── Root_Examples_Children_None.Output.verified.txt │ │ │ ├── Root_Examples_Children_Twelve.Output.verified.txt │ │ │ ├── Root_Examples_Leafs.Output.verified.txt │ │ │ ├── Root_Examples_Leafs_Eight.Output.verified.txt │ │ │ ├── Root_Examples_Leafs_None.Output.verified.txt │ │ │ ├── Root_Examples_Leafs_Twelve.Output.verified.txt │ │ │ └── Version.Output.verified.txt │ │ ├── Parsing │ │ │ ├── CannotAssignValueToFlag │ │ │ │ ├── Test_1.Output.verified.txt │ │ │ │ └── Test_2.Output.verified.txt │ │ │ ├── InvalidShortOptionName │ │ │ │ └── Test_1.Output.verified.txt │ │ │ ├── LongOptionNameContainSymbol │ │ │ │ └── Test_1.Output.verified.txt │ │ │ ├── LongOptionNameIsMissing │ │ │ │ └── Test_1.Output.verified.txt │ │ │ ├── LongOptionNameIsOneCharacter │ │ │ │ └── Test_1.Output.verified.txt │ │ │ ├── LongOptionNameStartWithDigit │ │ │ │ └── Test_1.Output.verified.txt │ │ │ ├── NoMatchingArgument │ │ │ │ └── Test_1.Output.verified.txt │ │ │ ├── NoValueForOption │ │ │ │ ├── Test_1.Output.verified.txt │ │ │ │ └── Test_2.Output.verified.txt │ │ │ ├── OptionWithoutName │ │ │ │ ├── Test_1.Output.verified.txt │ │ │ │ ├── Test_2.Output.verified.txt │ │ │ │ ├── Test_3.Output.verified.txt │ │ │ │ ├── Test_4.Output.verified.txt │ │ │ │ └── Test_5.Output.verified.txt │ │ │ ├── UnexpectedOption │ │ │ │ ├── Test_1.Output.verified.txt │ │ │ │ └── Test_2.Output.verified.txt │ │ │ ├── UnknownCommand │ │ │ │ ├── Test_1.Output.verified.txt │ │ │ │ ├── Test_2.Output.verified.txt │ │ │ │ ├── Test_3.Output.verified.txt │ │ │ │ ├── Test_4.Output.verified.txt │ │ │ │ ├── Test_5.Output.verified.txt │ │ │ │ ├── Test_6.Output.verified.txt │ │ │ │ ├── Test_7.Output.verified.txt │ │ │ │ └── Test_8.Output.verified.txt │ │ │ └── UnknownOption │ │ │ │ ├── Test_1.Output.verified.txt │ │ │ │ └── Test_2.Output.verified.txt │ │ └── Xml │ │ │ ├── Hidden_Command_Options.Output.verified.txt │ │ │ ├── Test_1.Output.verified.txt │ │ │ ├── Test_10.Output.verified.txt │ │ │ ├── Test_2.Output.verified.txt │ │ │ ├── Test_3.Output.verified.txt │ │ │ ├── Test_4.Output.verified.txt │ │ │ ├── Test_5.Output.verified.txt │ │ │ ├── Test_6.Output.verified.txt │ │ │ ├── Test_7.Output.verified.txt │ │ │ ├── Test_8.Output.verified.txt │ │ │ └── Test_9.Output.verified.txt │ ├── Properties │ │ └── Usings.cs │ ├── Spectre.Console.Cli.Tests.csproj │ ├── Unit │ │ ├── Annotations │ │ │ ├── CommandArgumentAttributeTests.Rendering.cs │ │ │ ├── CommandArgumentAttributeTests.cs │ │ │ ├── CommandOptionAttributeTests.Rendering.cs │ │ │ └── CommandOptionAttributeTests.cs │ │ ├── CommandAppTests.Async.cs │ │ ├── CommandAppTests.Branches.cs │ │ ├── CommandAppTests.Constructor.cs │ │ ├── CommandAppTests.Context.cs │ │ ├── CommandAppTests.Exceptions.cs │ │ ├── CommandAppTests.FlagValues.cs │ │ ├── CommandAppTests.Help.cs │ │ ├── CommandAppTests.Injection.Settings.cs │ │ ├── CommandAppTests.Injection.cs │ │ ├── CommandAppTests.Interceptor.cs │ │ ├── CommandAppTests.Options.cs │ │ ├── CommandAppTests.Pairs.cs │ │ ├── CommandAppTests.Parsing.cs │ │ ├── CommandAppTests.Remaining.cs │ │ ├── CommandAppTests.Sensitivity.cs │ │ ├── CommandAppTests.Settings.cs │ │ ├── CommandAppTests.TypeConverters.cs │ │ ├── CommandAppTests.Unsafe.cs │ │ ├── CommandAppTests.Validation.cs │ │ ├── CommandAppTests.ValueProviders.cs │ │ ├── CommandAppTests.Vectors.cs │ │ ├── CommandAppTests.Version.Help.cs │ │ ├── CommandAppTests.Version.cs │ │ ├── CommandAppTests.Xml.cs │ │ ├── CommandAppTests.cs │ │ ├── DefaultTypeRegistrarTests.cs │ │ ├── Parsing │ │ │ └── CommandTreeTokenizerTests.cs │ │ └── Testing │ │ │ ├── CommandAppTesterTests.cs │ │ │ ├── FakeTypeRegistrarTests.cs │ │ │ └── InteractiveCommandTests.cs │ ├── Utilities │ │ ├── CommandContextExtensions.cs │ │ └── ModuleInitializerAttribute.cs │ └── VerifyConfiguration.cs └── Spectre.Console.Tests │ ├── Data │ ├── Exceptions.cs │ ├── example.json │ ├── poison.flf │ └── starwars.flf │ ├── Expectations │ ├── AlternateScreen │ │ └── Show.Output.verified.txt │ ├── Cli │ │ ├── Arguments │ │ │ ├── ArgumentCannotContainOptions.Output.verified.txt │ │ │ ├── InvalidCharacterInOptionName.Output.verified.txt │ │ │ ├── InvalidCharacterInValueName.Output.verified.txt │ │ │ ├── LongOptionMustHaveMoreThanOneCharacter.Output.verified.txt │ │ │ ├── MissingLongAndShortName.Output.verified.txt │ │ │ ├── MultipleOptionValuesAreNotSupported.Output.verified.txt │ │ │ ├── MultipleValuesAreNotSupported.Output.verified.txt │ │ │ ├── OptionNamesCannotStartWithDigit.Output.verified.txt │ │ │ ├── OptionsMustHaveName.Output.verified.txt │ │ │ ├── ShortOptionMustOnlyBeOneCharacter.Output.verified.txt │ │ │ ├── UnexpectedCharacter.Output.verified.txt │ │ │ ├── UnterminatedValueName.Output.verified.txt │ │ │ └── ValuesMustHaveName.Output.verified.txt │ │ ├── Help │ │ │ ├── ArgumentOrder.Output.verified.txt │ │ │ ├── Command.Output.verified.txt │ │ │ ├── CommandExamples.Output.verified.txt │ │ │ ├── Default.Output.verified.txt │ │ │ ├── DefaultExamples.Output.verified.txt │ │ │ ├── Hidden_Command_Options.Output.verified.txt │ │ │ ├── Hidden_Commands.Output.verified.txt │ │ │ ├── Leaf.Output.verified.txt │ │ │ ├── NoDescription.Output.verified.txt │ │ │ ├── Root.Output.verified.txt │ │ │ ├── RootExamples.Output.verified.txt │ │ │ ├── RootExamples_Children.Output.verified.txt │ │ │ └── RootExamples_Leafs.Output.verified.txt │ │ ├── Parsing │ │ │ ├── CannotAssignValueToFlag │ │ │ │ ├── Test_1.Output.verified.txt │ │ │ │ └── Test_2.Output.verified.txt │ │ │ ├── InvalidShortOptionName │ │ │ │ └── Test_1.Output.verified.txt │ │ │ ├── LongOptionNameContainSymbol │ │ │ │ └── Test_1.Output.verified.txt │ │ │ ├── LongOptionNameIsMissing │ │ │ │ └── Test_1.Output.verified.txt │ │ │ ├── LongOptionNameIsOneCharacter │ │ │ │ └── Test_1.Output.verified.txt │ │ │ ├── LongOptionNameStartWithDigit │ │ │ │ └── Test_1.Output.verified.txt │ │ │ ├── NoMatchingArgument │ │ │ │ └── Test_1.Output.verified.txt │ │ │ ├── NoValueForOption │ │ │ │ ├── Test_1.Output.verified.txt │ │ │ │ └── Test_2.Output.verified.txt │ │ │ ├── OptionWithoutName │ │ │ │ ├── Test_1.Output.verified.txt │ │ │ │ ├── Test_2.Output.verified.txt │ │ │ │ ├── Test_3.Output.verified.txt │ │ │ │ ├── Test_4.Output.verified.txt │ │ │ │ └── Test_5.Output.verified.txt │ │ │ ├── UnexpectedOption │ │ │ │ ├── Test_1.Output.verified.txt │ │ │ │ └── Test_2.Output.verified.txt │ │ │ ├── UnknownCommand │ │ │ │ ├── Test_1.Output.verified.txt │ │ │ │ ├── Test_2.Output.verified.txt │ │ │ │ ├── Test_3.Output.verified.txt │ │ │ │ ├── Test_4.Output.verified.txt │ │ │ │ ├── Test_5.Output.verified.txt │ │ │ │ ├── Test_6.Output.verified.txt │ │ │ │ ├── Test_7.Output.verified.txt │ │ │ │ └── Test_8.Output.verified.txt │ │ │ └── UnknownOption │ │ │ │ ├── Test_1.Output.verified.txt │ │ │ │ └── Test_2.Output.verified.txt │ │ └── Xml │ │ │ ├── Hidden_Command_Options.Output.verified.txt │ │ │ ├── Test_1.Output.verified.txt │ │ │ ├── Test_2.Output.verified.txt │ │ │ ├── Test_3.Output.verified.txt │ │ │ ├── Test_4.Output.verified.txt │ │ │ ├── Test_5.Output.verified.txt │ │ │ └── Test_6.Output.verified.txt │ ├── Exception │ │ ├── CallSite.Output.verified.txt │ │ ├── Default.Output.verified.txt │ │ ├── GenericException.Output_exceptionFormats=Default.verified.txt │ │ ├── GenericException.Output_exceptionFormats=ShortenTypes.verified.txt │ │ ├── InnerException.Output.verified.txt │ │ ├── NoStackTrace.Output.verified.txt │ │ ├── OutParam.Output.verified.txt │ │ ├── ShortenedMethods.Output.verified.txt │ │ ├── ShortenedTypes.Output.verified.txt │ │ └── Tuple.Output.verified.txt │ ├── Live │ │ ├── Progress │ │ │ └── Render_ReduceWidth.Output.verified.txt │ │ └── Status │ │ │ └── Render.Output.verified.txt │ ├── Prompts │ │ └── Text │ │ │ ├── AcceptChoice.Output.verified.txt │ │ │ ├── AutoComplete_BestMatch.Output.verified.txt │ │ │ ├── AutoComplete_Empty.Output.verified.txt │ │ │ ├── AutoComplete_NextChoice.Output.verified.txt │ │ │ ├── AutoComplete_PreviousChoice.Output.verified.txt │ │ │ ├── ChoicesStyleNotSet.Output.verified.txt │ │ │ ├── ChoicesStyleSet.Output.verified.txt │ │ │ ├── ConversionError.Output.verified.txt │ │ │ ├── CustomConverter.Output.verified.txt │ │ │ ├── CustomValidation.Output.verified.txt │ │ │ ├── DefaultValue.Output.verified.txt │ │ │ ├── DefaultValueStyleNotSet.Output.verified.txt │ │ │ ├── DefaultValueStyleSet.Output.verified.txt │ │ │ ├── InvalidChoice.Output.verified.txt │ │ │ ├── NoSuffix.Output.verified.txt │ │ │ ├── SecretDefaultValue.Output.verified.txt │ │ │ ├── SecretDefaultValueCustomMask.Output.verified.txt │ │ │ ├── SecretDefaultValueNullMask.Output.verified.txt │ │ │ └── SecretValueBackspaceNullMask.Output.verified.txt │ ├── Rendering │ │ └── Borders │ │ │ ├── Box │ │ │ ├── AsciiBorder.Output.verified.txt │ │ │ ├── DoubleBorder.Output.verified.txt │ │ │ ├── HeavyBorder.Output.verified.txt │ │ │ ├── NoBorder.Output.verified.txt │ │ │ ├── NoBorder_With_Header.Output.verified.txt │ │ │ ├── RoundedBorder.Output.verified.txt │ │ │ └── SquareBorder.Output.verified.txt │ │ │ └── Table │ │ │ ├── Ascii2Border.Output.verified.txt │ │ │ ├── AsciiBorder.Output.verified.txt │ │ │ ├── AsciiDoubleHeadBorder.Output.verified.txt │ │ │ ├── DoubleBorder.Output.verified.txt │ │ │ ├── DoubleEdgeBorder.Output.verified.txt │ │ │ ├── HeavyBorder.Output.verified.txt │ │ │ ├── HeavyEdgeBorder.Output.verified.txt │ │ │ ├── HeavyHeadBorder.Output.verified.txt │ │ │ ├── HorizontalBorder.Output.verified.txt │ │ │ ├── MarkdownBorder.Output.verified.txt │ │ │ ├── MarkdownBorder_Centered.Output.verified.txt │ │ │ ├── MarkdownBorder_LeftAligned.Output.verified.txt │ │ │ ├── MarkdownBorder_RightAligned.Output.verified.txt │ │ │ ├── MinimalBorder.Output.verified.txt │ │ │ ├── MinimalDoubleHeadBorder.Output.verified.txt │ │ │ ├── MinimalHeavyHeadBorder.Output.verified.txt │ │ │ ├── NoBorder.Output.verified.txt │ │ │ ├── RoundedBorder.Output.verified.txt │ │ │ ├── SimpleBorder.Output.verified.txt │ │ │ ├── SimpleHeavyBorder.Output.verified.txt │ │ │ └── SquareBorder.Output.verified.txt │ ├── TableRowCollectionTests.TheUpdateMethod.Should_Update_Row.verified.txt │ ├── TableRowCollectionTests.TheUpdateMethod.Should_Update_Row_With_Renderable.verified.txt │ ├── TableRowCollectionTests.TheUpdateMethod.Should_Update_Row_With_String.verified.txt │ └── Widgets │ │ ├── Align │ │ ├── Center_Bottom.Output.verified.txt │ │ ├── Center_Middle.Output.verified.txt │ │ ├── Center_Top.Output.verified.txt │ │ ├── Left_Bottom.Output.verified.txt │ │ ├── Left_Middle.Output.verified.txt │ │ ├── Left_Top.Output.verified.txt │ │ ├── Right_Bottom.Output.verified.txt │ │ ├── Right_Middle.Output.verified.txt │ │ └── Right_Top.Output.verified.txt │ │ ├── BarChart │ │ ├── Fixed_Max_Value.Output.verified.txt │ │ ├── Render.Output.verified.txt │ │ └── Zero_Value.Output.verified.txt │ │ ├── BreakdownChart │ │ ├── Ansi.Output.verified.txt │ │ ├── Culture.Output.verified.txt │ │ ├── Default.Output.verified.txt │ │ ├── FullSize.Output.verified.txt │ │ ├── HideTagValues.Output.verified.txt │ │ ├── HideTags.Output.verified.txt │ │ ├── TagFormat.Output.verified.txt │ │ ├── ValueColor.Output.verified.txt │ │ └── Width.Output.verified.txt │ │ ├── Calendar │ │ ├── Centered.Output.verified.txt │ │ ├── Culture.Output.verified.txt │ │ ├── LeftAligned.Output.verified.txt │ │ ├── Render.Output.verified.txt │ │ └── RightAligned.Output.verified.txt │ │ ├── Canvas │ │ ├── Render.Output.verified.txt │ │ ├── Render_MaxWidth.Output.verified.txt │ │ ├── Render_NarrowTerminal.Output.verified.txt │ │ └── Render_Nested.Output.verified.txt │ │ ├── Columns │ │ └── Render.Output.verified.txt │ │ ├── Figlet │ │ ├── Load_Stream.Output_fontfile=poison.flf.verified.txt │ │ ├── Load_Stream.Output_fontfile=starwars.flf.verified.txt │ │ ├── Render.Output.verified.txt │ │ ├── Render_Centered.Output.verified.txt │ │ ├── Render_LeftAligned.Output.verified.txt │ │ ├── Render_RightAligned.Output.verified.txt │ │ └── Render_Wrapped.Output.verified.txt │ │ ├── Grid │ │ ├── AddEmptyRow │ │ │ └── Render.Output.verified.txt │ │ ├── Render.Output.verified.txt │ │ ├── Render_2.Output.verified.txt │ │ ├── Render_Alignment.Output.verified.txt │ │ ├── Render_ExplicitPadding.Output.verified.txt │ │ └── Render_Padding.Output.verified.txt │ │ ├── Json │ │ └── Render_Json.Output.verified.txt │ │ ├── Layout │ │ ├── Render_Empty_Layout.Output.verified.txt │ │ ├── Render_Fallback_Layout.Output.verified.txt │ │ ├── Render_Layout.Output.verified.txt │ │ ├── Render_Layout_With_Columns.Output.verified.txt │ │ ├── Render_Layout_With_Nested_Columns.Output.verified.txt │ │ ├── Render_Layout_With_Nested_Rows.Output.verified.txt │ │ ├── Render_Layout_With_Nested_Rows_And_Columns.Output.verified.txt │ │ ├── Render_Layout_With_Nested_Three_Rows_In_One_Column.Output_17.verified.txt │ │ ├── Render_Layout_With_Nested_Three_Rows_In_One_Column.Output_20.verified.txt │ │ ├── Render_Layout_With_Nested_Three_Rows_In_One_Column.Output_23.verified.txt │ │ ├── Render_Layout_With_Nested_Three_Rows_In_One_Column.Output_28.verified.txt │ │ ├── Render_Layout_With_Nested_Three_Rows_In_One_Column.Output_30.verified.txt │ │ ├── Render_Layout_With_Nested_Three_Rows_In_One_Column.Output_31.verified.txt │ │ ├── Render_Layout_With_Respect_To_Minimum_Size.Output.verified.txt │ │ ├── Render_Layout_With_Respect_To_Ratio.Output.verified.txt │ │ ├── Render_Layout_With_Respect_To_Size.Output.verified.txt │ │ ├── Render_Layout_With_Rows.Output.verified.txt │ │ └── Render_Layout_Without_Invisible_Children.Output.verified.txt │ │ ├── Padder │ │ ├── Render.Output.verified.txt │ │ ├── Render_Expanded.Output.verified.txt │ │ └── Render_Nested.Output.verified.txt │ │ ├── Panel │ │ ├── Render.Output.verified.txt │ │ ├── Render_CJK.Output.verified.txt │ │ ├── Render_Child_Centered.Output.verified.txt │ │ ├── Render_Child_Panel.Output.verified.txt │ │ ├── Render_Child_RightAligned.Output.verified.txt │ │ ├── Render_Expand.Output.verified.txt │ │ ├── Render_Header.Output.verified.txt │ │ ├── Render_Header_Centered.Output.verified.txt │ │ ├── Render_Header_Collapse.Output.verified.txt │ │ ├── Render_Header_LeftAligned.Output.verified.txt │ │ ├── Render_Header_RightAligned.Output.verified.txt │ │ ├── Render_Height.Output.verified.txt │ │ ├── Render_LineEndings.Output.verified.txt │ │ ├── Render_Multiline.Output.verified.txt │ │ ├── Render_Padding.Output.verified.txt │ │ ├── Render_Unicode.Output.verified.txt │ │ ├── Render_Width.Output.verified.txt │ │ ├── Render_Width_Height.Output.verified.txt │ │ ├── Render_Width_MaxWidth.Output.verified.txt │ │ ├── Render_Wrap.Output.verified.txt │ │ └── Render_ZeroPadding.Output.verified.txt │ │ ├── ProgressBar │ │ ├── Formatted.Output.verified.txt │ │ └── Render.Output.verified.txt │ │ ├── Recorder │ │ ├── Html.Output.verified.txt │ │ └── Text.Output.verified.txt │ │ ├── Rows │ │ ├── GH-1188-Rows.Output.verified.txt │ │ ├── Render.Output.verified.txt │ │ ├── Render_Empty.Output.verified.txt │ │ ├── Render_Expanded_And_Nested.Output.verified.txt │ │ └── Render_Nested.Output.verified.txt │ │ ├── Rule │ │ ├── Render.Output.verified.txt │ │ ├── Render_Border_Header.Output.verified.txt │ │ ├── Render_Border_NoHeader.Output.verified.txt │ │ ├── Render_Header_DefaultAlignment.Output.verified.txt │ │ ├── Render_Header_LeftAligned.Output.verified.txt │ │ ├── Render_Header_RightAligned.Output.verified.txt │ │ ├── Render_Linebreaks.Output.verified.txt │ │ └── Render_Truncate.Output.verified.txt │ │ ├── Table │ │ ├── AddEmptyRow.Output.verified.txt │ │ ├── Render.Output.verified.txt │ │ ├── Render_CellPadding.Output.verified.txt │ │ ├── Render_Centered.Align_Widget.verified.txt │ │ ├── Render_Centered.Output.verified.txt │ │ ├── Render_ColumnJustification.Output.verified.txt │ │ ├── Render_EA_Character.Output.verified.txt │ │ ├── Render_Empty_Column.Output.verified.txt │ │ ├── Render_Expand.Output.verified.txt │ │ ├── Render_Fold.Output.verified.txt │ │ ├── Render_Footers.Output.verified.txt │ │ ├── Render_Impossible.Output.verified.txt │ │ ├── Render_LeftAligned.Align_Widget.verified.txt │ │ ├── Render_LeftAligned.Output.verified.txt │ │ ├── Render_Multiline.Output.verified.txt │ │ ├── Render_Nested.Output.verified.txt │ │ ├── Render_NoRows.Output.verified.txt │ │ ├── Render_RightAligned.Align_Widget.verified.txt │ │ ├── Render_RightAligned.Output.verified.txt │ │ ├── Render_Row_Separators.Output.verified.txt │ │ ├── Render_Row_Separators_No_Header.Output.verified.txt │ │ ├── Render_Title_Caption.Output.verified.txt │ │ ├── Render_Title_Caption_Centered.Output.verified.txt │ │ ├── Render_Title_Caption_LeftAligned.Output.verified.txt │ │ ├── Render_Title_Caption_LowerCase.Output.verified.txt │ │ ├── Render_Title_Caption_RightAligned.Output.verified.txt │ │ └── Rows │ │ │ ├── Add.Output.verified.txt │ │ │ ├── Extensions │ │ │ ├── Add.Renderables.verified.txt │ │ │ ├── Add.Strings.verified.txt │ │ │ ├── Insert.Renderables.verified.txt │ │ │ ├── Insert.Strings.verified.txt │ │ │ └── Remove.Output.verified.txt │ │ │ ├── Insert.Output.verified.txt │ │ │ └── Remove.Output.verified.txt │ │ ├── TextPath │ │ └── GH-1307.Output.verified.txt │ │ └── Tree │ │ ├── Render.Output.verified.txt │ │ └── Render_NoChildren.Output.verified.txt │ ├── Extensions │ ├── ConsoleKeyExtensions.cs │ └── StreamExtensions.cs │ ├── Properties │ └── Usings.cs │ ├── Spectre.Console.Tests.csproj │ ├── Unit │ ├── AlternateScreenTests.cs │ ├── AnsiConsoleTests.Advanced.cs │ ├── AnsiConsoleTests.Colors.cs │ ├── AnsiConsoleTests.Cursor.cs │ ├── AnsiConsoleTests.Markup.cs │ ├── AnsiConsoleTests.MarkupInterpolated.cs │ ├── AnsiConsoleTests.Prompt.cs │ ├── AnsiConsoleTests.Style.cs │ ├── AnsiConsoleTests.cs │ ├── ColorSystemTests.cs │ ├── ColorTests.cs │ ├── EmojiTests.cs │ ├── ExceptionTests.cs │ ├── HighlightTests.cs │ ├── Internal │ │ └── FileSizeTests.cs │ ├── Live │ │ ├── Progress │ │ │ ├── DownloadedColumnTests.cs │ │ │ ├── ProgressColumnFixture.cs │ │ │ └── ProgressTests.cs │ │ └── StatusTests.cs │ ├── Prompts │ │ ├── ListPromptStateTests.cs │ │ ├── MultiSelectionPromptTests.cs │ │ ├── SelectionPromptTests.cs │ │ └── TextPromptTests.cs │ ├── RecorderTests.cs │ ├── Rendering │ │ ├── Borders │ │ │ ├── BoxBorderTests.cs │ │ │ └── TableBorderTests.cs │ │ ├── RenderHookTests.cs │ │ └── SegmentTests.cs │ ├── StyleTests.cs │ └── Widgets │ │ ├── AlignTests.cs │ │ ├── BarChartTests.cs │ │ ├── BreakdownChartTests.cs │ │ ├── CalendarTests.cs │ │ ├── CanvasTests.cs │ │ ├── ColumnsTests.cs │ │ ├── FigletTests.cs │ │ ├── GridTests.cs │ │ ├── JsonTextTests.cs │ │ ├── LayoutTests.cs │ │ ├── MarkupTests.cs │ │ ├── PadderTests.cs │ │ ├── PanelTests.cs │ │ ├── ProgressBarTests.cs │ │ ├── RowsTests.cs │ │ ├── RuleTests.cs │ │ ├── Table │ │ ├── TableRowCollectionExtensionsTests.cs │ │ ├── TableRowCollectionTests.cs │ │ └── TableTests.cs │ │ ├── TextPathTests.cs │ │ ├── TextTests.cs │ │ └── TreeTests.cs │ ├── Utilities │ ├── EmbeddedResourceReader.cs │ ├── GitHubIssueAttribute.cs │ ├── ModuleInitializerAttribute.cs │ └── TestConsoleExtensions.cs │ └── VerifyConfiguration.cs └── stylecop.json /.git-blame-ignore-revs: -------------------------------------------------------------------------------- 1 | # Use file scoped namespace declarations 2 | 7b2da0a4f63bf3ceab99d2c88535e74155f2b99c 3 | 4 | # fix line-endings 5 | e2ad4b1ea5555e701cda4fd400bb6592e318e1ff 6 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | 3 | *.cs text eol=lf 4 | *.md text eol=lf 5 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | -------------------------------------------------------------------------------- /.github/funding.yml: -------------------------------------------------------------------------------- 1 | github: patriksvensson -------------------------------------------------------------------------------- /.github/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "config:base" 5 | ], 6 | "dependencyDashboard": false, 7 | "commitMessagePrefix": "chore:", 8 | "labels": ["dependencies"], 9 | "npm": { 10 | "ignorePaths": [ 11 | "**/node_modules/**", 12 | "**/bower_components/**", 13 | "docs/**" 14 | ] 15 | }, 16 | "ignorePaths": [ 17 | "resources/scripts/**", 18 | "docs/**" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /.github/workflows/backlog.yaml: -------------------------------------------------------------------------------- 1 | # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json 2 | name: Add issues/PRs to backlog automatically 3 | 4 | on: 5 | issues: 6 | types: 7 | - opened 8 | - transferred 9 | 10 | jobs: 11 | add-to-project: 12 | name: Add issue to backlog 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/add-to-project@main 16 | with: 17 | project-url: https://github.com/orgs/spectreconsole/projects/1 18 | github-token: ${{ secrets.PROJECT_TOKEN }} -------------------------------------------------------------------------------- /NuGet.Config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /docs/Preview.ps1: -------------------------------------------------------------------------------- 1 | dotnet run -- preview -------------------------------------------------------------------------------- /docs/dotnet-tools.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "isRoot": true, 4 | "tools": { 5 | "microsoft.playwright.cli": { 6 | "version": "1.2.3", 7 | "commands": [ 8 | "playwright" 9 | ] 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /docs/global.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdk": { 3 | "version": "9.0.202", 4 | "rollForward": "latestFeature" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /docs/input/CNAME: -------------------------------------------------------------------------------- 1 | spectreconsole.net -------------------------------------------------------------------------------- /docs/input/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using Statiq.Common 2 | @using Statiq.Razor 3 | @using Statiq.Web 4 | @using Statiq.Web.Pipelines 5 | @using Docs 6 | @using Docs.Utilities; 7 | 8 | @inherits StatiqRazorPage -------------------------------------------------------------------------------- /docs/input/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = @"_layout.cshtml"; 3 | } -------------------------------------------------------------------------------- /docs/input/analyzer/rules/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = @"_layout.cshtml"; 3 | } -------------------------------------------------------------------------------- /docs/input/analyzer/rules/_layout.cshtml: -------------------------------------------------------------------------------- 1 | @inherits StatiqRazorPage 2 | 3 | @{ 4 | Layout = @"../../_layout.cshtml"; 5 | } 6 | 7 | 8 |

@Document.GetString("Description")

9 | 10 | @RenderBody() -------------------------------------------------------------------------------- /docs/input/api/Kind/_Event.cshtml: -------------------------------------------------------------------------------- 1 | @await Html.PartialAsync("../Sections/_Syntax.cshtml") 2 | @await Html.PartialAsync("../Sections/_Examples.cshtml") 3 | @await Html.PartialAsync("../Sections/_Remarks.cshtml") 4 | @await Html.PartialAsync("../Sections/_SeeAlso.cshtml") -------------------------------------------------------------------------------- /docs/input/api/Kind/_Field.cshtml: -------------------------------------------------------------------------------- 1 | @await Html.PartialAsync("../Sections/_Summary.cshtml") 2 | @await Html.PartialAsync("../Sections/_Syntax.cshtml") 3 | @await Html.PartialAsync("../Sections/_SymbolInfo.cshtml") 4 | @await Html.PartialAsync("../Sections/_Examples.cshtml") 5 | @await Html.PartialAsync("../Sections/_Remarks.cshtml") 6 | @await Html.PartialAsync("../Sections/_Attributes.cshtml") 7 | @await Html.PartialAsync("../Sections/_Parameters.cshtml") 8 | @await Html.PartialAsync("../Sections/_Value.cshtml") 9 | @await Html.PartialAsync("../Sections/_SeeAlso.cshtml") -------------------------------------------------------------------------------- /docs/input/api/Kind/_Property.cshtml: -------------------------------------------------------------------------------- 1 | @await Html.PartialAsync("../Sections/_Summary.cshtml") 2 | @await Html.PartialAsync("../Sections/_Syntax.cshtml") 3 | @await Html.PartialAsync("../Sections/_SymbolInfo.cshtml") 4 | @await Html.PartialAsync("../Sections/_Examples.cshtml") 5 | @await Html.PartialAsync("../Sections/_Remarks.cshtml") 6 | @await Html.PartialAsync("../Sections/_Attributes.cshtml") 7 | @await Html.PartialAsync("../Sections/_Parameters.cshtml") 8 | @await Html.PartialAsync("../Sections/_Value.cshtml") 9 | @await Html.PartialAsync("../Sections/_SeeAlso.cshtml") -------------------------------------------------------------------------------- /docs/input/api/Sections/_ConstantValue.cshtml.cs: -------------------------------------------------------------------------------- 1 | namespace Docs.input.api.Sections; 2 | 3 | public class _ConstantValue_cshtml 4 | { 5 | 6 | } -------------------------------------------------------------------------------- /docs/input/api/Sections/_DocumentList.cshtml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/docs/input/api/Sections/_DocumentList.cshtml -------------------------------------------------------------------------------- /docs/input/api/Sections/_Events.cshtml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/docs/input/api/Sections/_Events.cshtml -------------------------------------------------------------------------------- /docs/input/api/Sections/_Examples.cshtml: -------------------------------------------------------------------------------- 1 | @using Statiq.CodeAnalysis 2 | @{ 3 | var examples = Document.GetString(CodeAnalysisKeys.Example); 4 | if (!examples.IsNullOrWhiteSpace()) 5 | { 6 |

Examples

7 |
@Html.Raw(examples)
8 | } 9 | } -------------------------------------------------------------------------------- /docs/input/api/Sections/_Operators.cshtml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/docs/input/api/Sections/_Operators.cshtml -------------------------------------------------------------------------------- /docs/input/api/Sections/_Remarks.cshtml: -------------------------------------------------------------------------------- 1 | @using Statiq.CodeAnalysis 2 | @{ 3 | var remarks = Document.GetString(CodeAnalysisKeys.Remarks); 4 | if (!remarks.IsNullOrWhiteSpace()) 5 | { 6 |

Remarks

7 |
@Html.Raw(remarks)
8 | } 9 | } -------------------------------------------------------------------------------- /docs/input/api/Sections/_SeeAlso.cshtml: -------------------------------------------------------------------------------- 1 | @using Statiq.CodeAnalysis 2 | @{ 3 | var seeAlso = Document.GetList(CodeAnalysisKeys.SeeAlso); 4 | if (seeAlso?.Count > 0) 5 | { 6 |

See Also

7 |
    8 | @foreach (string seeAlsoComment in seeAlso) 9 | { 10 |
  • @Html.Raw(seeAlsoComment)
  • 11 | } 12 |
13 | } 14 | } -------------------------------------------------------------------------------- /docs/input/api/Sections/_Summary.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | var summary = Document.GetString("Summary"); 3 | if (!summary.IsNullOrWhiteSpace()) 4 | { 5 |
@Html.Raw(summary)
6 | } 7 | } -------------------------------------------------------------------------------- /docs/input/api/Sections/_Syntax.cshtml: -------------------------------------------------------------------------------- 1 | @using Statiq.CodeAnalysis 2 | @{ 3 | string syntax = Document.GetString(CodeAnalysisKeys.Syntax); 4 | if (!syntax.IsNullOrWhiteSpace()) 5 | { 6 |
@syntax
7 | } 8 | } -------------------------------------------------------------------------------- /docs/input/api/Sections/_Value.cshtml: -------------------------------------------------------------------------------- 1 | @using Statiq.CodeAnalysis 2 | @using Docs.Extensions 3 | @{ 4 | IDocument type = Document.GetDocument(CodeAnalysisKeys.Type); 5 | string value = Document.GetString(CodeAnalysisKeys.Value); 6 | } 7 | 8 | @if (type is object && !string.IsNullOrWhiteSpace(value)) 9 | { 10 |

@Context.GetTypeLink(type)

11 |

@Html.Raw(value)

12 | } -------------------------------------------------------------------------------- /docs/input/api/index.cshtml: -------------------------------------------------------------------------------- 1 | Title: API Reference 2 | Order: 10000 3 | --- 4 |

The Spectre.Console API reference is organized by namespace. Each namespace has one or more classes for working with Console applications.

5 | 6 |
    7 | @foreach (var child in OutputPages.GetChildrenOf(Document).OrderBy(i => i.GetTitle())) 8 | { 9 |
  • @Html.DocumentLink(child)
  • 10 | } 11 |
-------------------------------------------------------------------------------- /docs/input/appendix/index.cshtml: -------------------------------------------------------------------------------- 1 | Title: Appendix 2 | Order: 100 3 | --- 4 |

Sections

5 | 6 |
    7 | @foreach (IDocument child in OutputPages.GetChildrenOf(Document)) 8 | { 9 |
  • @Html.DocumentLink(child)
  • 10 | } 11 |
-------------------------------------------------------------------------------- /docs/input/assets/CascadiaMonoPL.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/docs/input/assets/CascadiaMonoPL.woff2 -------------------------------------------------------------------------------- /docs/input/assets/casts/align-rich.cast: -------------------------------------------------------------------------------- 1 | {"version": 2, "width": 40, "height": 3, "timestamp": 1667342769, "env": {"SHELL": "/bin/bash", "TERM": "xterm-256color"}} 2 | [0.0, "o", "\u001b[H\u001b[2B\u001b[38;5;9;48;5;0mSpectre!\u001b[0m"] 3 | -------------------------------------------------------------------------------- /docs/input/assets/casts/grid-rich.cast: -------------------------------------------------------------------------------- 1 | {"version": 2, "width": 40, "height": 3, "timestamp": 1667342769, "env": {"SHELL": "/bin/bash", "TERM": "xterm-256color"}} 2 | [0.0, "o", "\u001b[38;5;9;48;5;0mHeader 1\u001b[0m \u001b[38;5;2;48;5;0mHeader 2\u001b[0m \u001b[38;5;12;48;5;0mHeader 3\u001b[0m\r\nRow 1 Row 2 Row 3\r\n"] 3 | -------------------------------------------------------------------------------- /docs/input/assets/casts/padder-rich.cast: -------------------------------------------------------------------------------- 1 | {"version": 2, "width": 40, "height": 6, "timestamp": 1667448519, "env": {"SHELL": "/bin/bash", "TERM": "xterm-256color"}} 2 | [0.0, "o", " \r\n \u001b[38;5;9;48;5;0mPadded Text I\u001b[0m \u001b[38;5;12;48;5;0mPadded Text II\u001b[0m \r\n \r\n"] 3 | -------------------------------------------------------------------------------- /docs/input/assets/casts/rows-rich.cast: -------------------------------------------------------------------------------- 1 | {"version": 2, "width": 50, "height": 5, "timestamp": 1667278514, "env": {"SHELL": "/bin/bash", "TERM": "xterm-256color"}} 2 | [0, "o", "\u001b[38;5;9;48;5;0mItem 1\u001b[0m\r\n\u001b[38;5;2;48;5;0mItem 2\u001b[0m\r\n\u001b[38;5;12;48;5;0mItem 3\u001b[0m\r\n"] 3 | -------------------------------------------------------------------------------- /docs/input/assets/favicons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/docs/input/assets/favicons/apple-touch-icon.png -------------------------------------------------------------------------------- /docs/input/assets/favicons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/docs/input/assets/favicons/favicon-16x16.png -------------------------------------------------------------------------------- /docs/input/assets/favicons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/docs/input/assets/favicons/favicon-32x32.png -------------------------------------------------------------------------------- /docs/input/assets/images/barchart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/docs/input/assets/images/barchart.png -------------------------------------------------------------------------------- /docs/input/assets/images/borders/panel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/docs/input/assets/images/borders/panel.png -------------------------------------------------------------------------------- /docs/input/assets/images/borders/table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/docs/input/assets/images/borders/table.png -------------------------------------------------------------------------------- /docs/input/assets/images/compact_exception.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/docs/input/assets/images/compact_exception.png -------------------------------------------------------------------------------- /docs/input/assets/images/custom_exception.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/docs/input/assets/images/custom_exception.png -------------------------------------------------------------------------------- /docs/input/assets/images/example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/docs/input/assets/images/example.png -------------------------------------------------------------------------------- /docs/input/assets/images/exception.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/docs/input/assets/images/exception.png -------------------------------------------------------------------------------- /docs/input/assets/images/multiselection.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/docs/input/assets/images/multiselection.gif -------------------------------------------------------------------------------- /docs/input/assets/images/progress.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/docs/input/assets/images/progress.gif -------------------------------------------------------------------------------- /docs/input/assets/images/progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/docs/input/assets/images/progress.png -------------------------------------------------------------------------------- /docs/input/assets/images/progress_fallback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/docs/input/assets/images/progress_fallback.png -------------------------------------------------------------------------------- /docs/input/assets/images/rule.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/docs/input/assets/images/rule.png -------------------------------------------------------------------------------- /docs/input/assets/images/selection.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/docs/input/assets/images/selection.gif -------------------------------------------------------------------------------- /docs/input/assets/images/status.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/docs/input/assets/images/status.gif -------------------------------------------------------------------------------- /docs/input/assets/images/table.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/docs/input/assets/images/table.gif -------------------------------------------------------------------------------- /docs/input/assets/images/table.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/docs/input/assets/images/table.mp4 -------------------------------------------------------------------------------- /docs/input/assets/images/table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/docs/input/assets/images/table.png -------------------------------------------------------------------------------- /docs/input/assets/images/table.webm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/docs/input/assets/images/table.webm -------------------------------------------------------------------------------- /docs/input/assets/images/tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/docs/input/assets/images/tree.png -------------------------------------------------------------------------------- /docs/input/assets/styles.css: -------------------------------------------------------------------------------- 1 | /* place holder for tailwind. jit mode will dynamically build this when running the statiq process */ -------------------------------------------------------------------------------- /docs/input/blog/_directory.yaml: -------------------------------------------------------------------------------- 1 | Hidden: true 2 | Order: 1000 -------------------------------------------------------------------------------- /docs/input/blog/_index.yaml: -------------------------------------------------------------------------------- 1 | Title: Recent Blog Posts 2 | ArchiveSources: blog/posts/**/* 3 | ArchiveDestination: > 4 | => GetInt("Index") <= 1 ? $"blog/index.html" : $"blog/{GetInt("Index")}.html" 5 | ArchivePageSize: 5 6 | ArchiveOrderKey: Published 7 | ArchiveOrderDescending: true 8 | Hidden: > 9 | => doc.GetInt("Index") == 1 ? false : true 10 | Order: 25 11 | -------------------------------------------------------------------------------- /docs/input/blog/category.cshtml: -------------------------------------------------------------------------------- 1 | @inherits StatiqRazorPage 2 | @if (Document.ContainsKey(Keys.GroupKey)) 3 | { 4 | @Html.Partial("_posts.cshtml", Document.GetChildren()) 5 | @Html.Partial("_nextprevious.cshtml", Document) 6 | } 7 | else 8 | { 9 | @foreach (var tag in Document.GetChildren().OrderByDescending(x => x.GetChildren().Count())) 10 | { 11 | var postCount = tag.GetChildren().Count().ToString(); 12 | @tag.GetTitle() (@postCount) 13 | } 14 | } -------------------------------------------------------------------------------- /docs/input/blog/index.cshtml: -------------------------------------------------------------------------------- 1 | @inherits StatiqRazorPage 2 | @Html.Partial("_posts.cshtml", Document.GetChildren()) 3 | @Html.Partial("_nextprevious.cshtml", Document) 4 | -------------------------------------------------------------------------------- /docs/input/blog/posts/2021-07-11-hello-world.md: -------------------------------------------------------------------------------- 1 | Title: Hello, World 2 | Description: To help track new releases, updates and planning for Spectre.Console, we've added a new blog to the documentation. 3 | Published: 2021-07-11 4 | Category: News 5 | --- 6 | 7 | To help track new releases, updates and planning for Spectre.Console, we've added a new blog to the documentation. 8 | 9 | Stay tuned for upcoming information related to the 0.41 release! -------------------------------------------------------------------------------- /docs/input/blog/posts/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_layout.cshtml"; 3 | } -------------------------------------------------------------------------------- /docs/input/cli/index.cshtml: -------------------------------------------------------------------------------- 1 | Title: Spectre.Console.Cli 2 | Order: 80 3 | Description: "The command line interface for the *Spectre.Console* project." 4 | --- 5 | 6 |

Spectre.Console.Cli is a modern library for parsing command line arguments. While it's extremely opinionated in what it does, it tries to follow established industry conventions, and draws its inspiration from applications you use everyday.

7 | 8 |
    9 | @foreach (IDocument child in OutputPages.GetChildrenOf(Document)) 10 | { 11 |
  • @Html.DocumentLink(child)
  • 12 | } 13 |
-------------------------------------------------------------------------------- /docs/input/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/docs/input/favicon.ico -------------------------------------------------------------------------------- /docs/input/live/index.cshtml: -------------------------------------------------------------------------------- 1 | Title: Live 2 | Order: 50 3 | Description: Live displays continue to redraw their contents until an action is complete. 4 | --- 5 | 6 | Live displays continue to redraw their contents until an action is complete. 7 | 8 |
    9 | @foreach (IDocument child in OutputPages.GetChildrenOf(Document)) 10 | { 11 |
  • @Html.DocumentLink(child)
  • 12 | } 13 |
-------------------------------------------------------------------------------- /docs/input/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /docs/input/prompts/index.cshtml: -------------------------------------------------------------------------------- 1 | Title: Prompts 2 | Order: 60 3 | Description: "*Spectre.Console* has multiple controls to assist in user input." 4 | --- 5 | 6 |
    7 | @foreach (IDocument child in OutputPages.GetChildrenOf(Document)) 8 | { 9 |
  • @Html.DocumentLink(child)
  • 10 | } 11 |
-------------------------------------------------------------------------------- /docs/input/widgets/index.cshtml: -------------------------------------------------------------------------------- 1 | Title: Widgets 2 | Order: 70 3 | Description: "*Spectre.Console* supports many built-in widgets to help render beautiful output." 4 | --- 5 | 6 |
    7 | @foreach (IDocument child in OutputPages.GetChildrenOf(Document)) 8 | { 9 |
  • @Html.DocumentLink(child)
  • 10 | } 11 |
-------------------------------------------------------------------------------- /docs/src/Extensions/StringExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace Docs.Extensions 2 | { 3 | public static class StringExtensions 4 | { 5 | public static bool IsNotEmpty(this string source) 6 | { 7 | return !string.IsNullOrWhiteSpace(source); 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /docs/src/Models/ColorModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Docs.Models 4 | { 5 | public sealed class ColorModel 6 | { 7 | public List Colors { get; set; } 8 | 9 | public ColorModel(IEnumerable colors) 10 | { 11 | Colors = new List(colors); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /docs/src/Models/Emoji.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Newtonsoft.Json; 3 | 4 | namespace Docs.Models 5 | { 6 | public sealed class Emoji 7 | { 8 | public string Id { get; set; } 9 | public string Name { get; set; } 10 | public string Description { get; set; } 11 | public string Code { get; set; } 12 | 13 | public static List Parse(string json) 14 | { 15 | return JsonConvert.DeserializeObject>(json); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /docs/src/Shortcodes/AlertShortcode.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Statiq.Common; 3 | 4 | namespace Docs.Shortcodes 5 | { 6 | public class AlertShortcode : SyncShortcode 7 | { 8 | public override ShortcodeResult Execute(KeyValuePair[] args, string content, IDocument document, IExecutionContext context) 9 | { 10 | return $"
{content}
"; 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /docs/src/Shortcodes/InfoShortcode.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Statiq.Common; 3 | 4 | namespace Docs.Shortcodes 5 | { 6 | public class InfoShortcode : SyncShortcode 7 | { 8 | public override ShortcodeResult Execute(KeyValuePair[] args, string content, IDocument document, IExecutionContext context) 9 | { 10 | return $"
{content}
"; 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /docs/src/SocialCards/CascadiaCodePL.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/docs/src/SocialCards/CascadiaCodePL.woff2 -------------------------------------------------------------------------------- /docs/src/Utilities/TypeNameLinks.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Concurrent; 2 | 3 | namespace Docs.Utilities; 4 | 5 | public class TypeNameLinks 6 | { 7 | public ConcurrentDictionary Links { get; } = new ConcurrentDictionary(); 8 | } -------------------------------------------------------------------------------- /dotnet-tools.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "isRoot": true, 4 | "tools": { 5 | "cake.tool": { 6 | "version": "5.0.0", 7 | "commands": [ 8 | "dotnet-cake" 9 | ] 10 | }, 11 | "verify.tool": { 12 | "version": "0.6.0", 13 | "commands": [ 14 | "dotnet-verify" 15 | ] 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /global.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/global", 3 | "sdk": { 4 | "version": "9.0.202", 5 | "rollForward": "latestFeature" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /resources/gfx/large-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/resources/gfx/large-logo.png -------------------------------------------------------------------------------- /resources/gfx/medium-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/resources/gfx/medium-logo.png -------------------------------------------------------------------------------- /resources/gfx/small-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/resources/gfx/small-logo.png -------------------------------------------------------------------------------- /resources/nuget/Spectre.Console.Cli.md: -------------------------------------------------------------------------------- 1 | # `Spectre.Console.Cli` 2 | 3 | `Spectre.Console.Cli` is a modern library for parsing command line arguments. While it's extremely opinionated in what it does, it tries to follow established industry conventions, and draws its inspiration from applications you use everyday. 4 | 5 | Detailed instructions for using this library is located on the project website, https://spectreconsole.net -------------------------------------------------------------------------------- /resources/nuget/Spectre.Console.ImageSharp.md: -------------------------------------------------------------------------------- 1 | # `Spectre.Console.ImageSharp` 2 | 3 | A .NET library that extends [Spectre.Console](https://github.com/spectreconsole/spectre.console) with ImageSharp superpowers. 4 | 5 | Detailed instructions for using `Spectre.Console.ImageSharp` are located on the project website, https://spectreconsole.net/widgets/canvas-image -------------------------------------------------------------------------------- /resources/nuget/Spectre.Console.Json.md: -------------------------------------------------------------------------------- 1 | # `Spectre.Console.Json` 2 | 3 | A .NET library that extends [Spectre.Console](https://github.com/spectreconsole/spectre.console) with JSON superpowers. 4 | 5 | Detailed instructions for using this library is located on the project website, https://spectreconsole.net/widgets/json -------------------------------------------------------------------------------- /resources/nuget/Spectre.Console.Testing.md: -------------------------------------------------------------------------------- 1 | # `Spectre.Console.Testing` 2 | 3 | A .NET library that makes it easier to write unit tests for [Spectre.Console](https://github.com/spectreconsole/spectre.console) applications. 4 | 5 | Detailed instructions for using this library is located on the project website, https://spectreconsole.net -------------------------------------------------------------------------------- /resources/nuget/Spectre.Console.md: -------------------------------------------------------------------------------- 1 | # `Spectre.Console` 2 | 3 | A .NET library that makes it easier to create beautiful, cross platform, console applications. It is heavily inspired by the excellent Python library, [Rich](https://github.com/willmcgugan/rich). 4 | 5 | Detailed instructions for using this library is located on the project website, https://spectreconsole.net -------------------------------------------------------------------------------- /resources/nuget/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/resources/nuget/logo.png -------------------------------------------------------------------------------- /resources/scripts/.gitignore: -------------------------------------------------------------------------------- 1 | Generated 2 | Temp -------------------------------------------------------------------------------- /resources/scripts/Generate-Samples.ps1: -------------------------------------------------------------------------------- 1 | # first arg is either the name of a single sample you want to run or leave 2 | # blank if you want to run them all. the samples aren't going to run at the same 3 | # speed each time so if you run all of them you'll have everything as a change 4 | # for your commit so use this sparingly. 5 | 6 | # Generate the files 7 | Push-Location Generator 8 | dotnet run -- samples -o "../../../docs/input/assets/casts" $args[0] 9 | if(!$?) { 10 | Pop-Location 11 | Throw "An error occured when generating code." 12 | } 13 | Pop-Location -------------------------------------------------------------------------------- /resources/scripts/Generator/Commands/AsciiCast/AsciiCastExtensions.cs: -------------------------------------------------------------------------------- 1 | using Spectre.Console; 2 | 3 | namespace Generator.Commands 4 | { 5 | public static class AsciiCastExtensions 6 | { 7 | public static AsciiCastOut WrapWithAsciiCastRecorder(this IAnsiConsole ansiConsole) 8 | { 9 | AsciiCastOut castRecorder = new(ansiConsole.Profile.Out); 10 | ansiConsole.Profile.Out = castRecorder; 11 | 12 | return castRecorder; 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /resources/scripts/Generator/Commands/GeneratorSettings.cs: -------------------------------------------------------------------------------- 1 | using Spectre.Console.Cli; 2 | 3 | namespace Generator.Commands 4 | { 5 | public class GeneratorSettings : CommandSettings 6 | { 7 | [CommandArgument(0, "")] 8 | public string Output { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /resources/scripts/Generator/Data/spinners_default.json: -------------------------------------------------------------------------------- 1 | { 2 | "Default": { 3 | "interval": 100, 4 | "unicode": true, 5 | "frames": [ 6 | "⣷", 7 | "⣯", 8 | "⣟", 9 | "⡿", 10 | "⢿", 11 | "⣻", 12 | "⣽", 13 | "⣾" 14 | ] 15 | }, 16 | "Ascii": { 17 | "interval": 100, 18 | "unicode": true, 19 | "frames": [ 20 | "-", 21 | "\\", 22 | "|", 23 | "/", 24 | "-", 25 | "\\", 26 | "|", 27 | "/" 28 | ] 29 | } 30 | } -------------------------------------------------------------------------------- /resources/scripts/Generator/Models/ColorModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Generator.Models 4 | { 5 | public sealed class ColorModel 6 | { 7 | public List Colors { get; set; } 8 | 9 | public ColorModel(IEnumerable colors) 10 | { 11 | Colors = new List(colors); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /resources/scripts/Generator/Models/Palette.cs: -------------------------------------------------------------------------------- 1 | namespace Generator.Models 2 | { 3 | public sealed class Palette 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /resources/scripts/Generator/Templates/Emoji.Json.template: -------------------------------------------------------------------------------- 1 | [ 2 | {{~ for x in 0..(emojis.size-1) ~}} 3 | { 4 | "id": "{{ emojis[x].identifier }}", 5 | "name": "{{ emojis[x].name }}", 6 | "description": "{{ emojis[x].description }}", 7 | "code": "{{ emojis[x].normalized_code }}" 8 | }{{ if x != (emojis.size-1) }},{{ end }} 9 | {{~ end ~}} 10 | ] -------------------------------------------------------------------------------- /resources/spectre.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spectreconsole/spectre.console/f32f80dc57d8b0c8446a72ea0d382f3048f8bac1/resources/spectre.snk -------------------------------------------------------------------------------- /src/Directory.Build.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | preview.0 5 | normal 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/Extensions/Spectre.Console.Json/IJsonParser.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Json; 2 | 3 | /// 4 | /// Represents a JSON parser. 5 | /// 6 | public interface IJsonParser 7 | { 8 | /// 9 | /// Parses the provided JSON into an abstract syntax tree. 10 | /// 11 | /// The JSON to parse. 12 | /// An instance. 13 | JsonSyntax Parse(string json); 14 | } 15 | -------------------------------------------------------------------------------- /src/Extensions/Spectre.Console.Json/JsonToken.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Json; 2 | 3 | internal sealed class JsonToken 4 | { 5 | public JsonTokenType Type { get; } 6 | public string Lexeme { get; } 7 | 8 | public JsonToken(JsonTokenType type, string lexeme) 9 | { 10 | Type = type; 11 | Lexeme = lexeme ?? throw new ArgumentNullException(nameof(lexeme)); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Extensions/Spectre.Console.Json/JsonTokenType.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Json; 2 | 3 | internal enum JsonTokenType 4 | { 5 | LeftBrace, 6 | RightBrace, 7 | LeftBracket, 8 | RightBracket, 9 | Colon, 10 | Comma, 11 | String, 12 | Number, 13 | Boolean, 14 | Null, 15 | } 16 | -------------------------------------------------------------------------------- /src/Extensions/Spectre.Console.Json/Properties/Usings.cs: -------------------------------------------------------------------------------- 1 | global using System.Text; 2 | global using Spectre.Console.Internal; 3 | global using Spectre.Console.Json.Syntax; 4 | global using Spectre.Console.Rendering; -------------------------------------------------------------------------------- /src/Extensions/Spectre.Console.Json/Syntax/JsonNumber.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Json.Syntax; 2 | 3 | internal sealed class JsonNumber : JsonSyntax 4 | { 5 | public string Lexeme { get; } 6 | 7 | public JsonNumber(string lexeme) 8 | { 9 | Lexeme = lexeme; 10 | } 11 | 12 | internal override void Accept(JsonSyntaxVisitor visitor, T context) 13 | { 14 | visitor.VisitNumber(this, context); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Extensions/Spectre.Console.Json/Syntax/JsonSyntax.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Json.Syntax; 2 | 3 | /// 4 | /// Represents a syntax node in the JSON abstract syntax tree. 5 | /// 6 | public abstract class JsonSyntax 7 | { 8 | internal abstract void Accept(JsonSyntaxVisitor visitor, T context); 9 | } 10 | -------------------------------------------------------------------------------- /src/Spectre.Console.Cli/CommandSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Cli; 2 | 3 | /// 4 | /// Base class for command settings. 5 | /// 6 | public abstract class CommandSettings 7 | { 8 | /// 9 | /// Performs validation of the settings. 10 | /// 11 | /// The validation result. 12 | public virtual ValidationResult Validate() 13 | { 14 | return ValidationResult.Success(); 15 | } 16 | } -------------------------------------------------------------------------------- /src/Spectre.Console.Cli/EmptyCommandSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Cli; 2 | 3 | /// 4 | /// Represents empty settings. 5 | /// 6 | public sealed class EmptyCommandSettings : CommandSettings 7 | { 8 | } -------------------------------------------------------------------------------- /src/Spectre.Console.Cli/Help/ICommandArgument.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Cli.Help; 2 | 3 | /// 4 | /// Represents a command argument. 5 | /// 6 | public interface ICommandArgument : ICommandParameter 7 | { 8 | /// 9 | /// Gets the value of the argument. 10 | /// 11 | string Value { get; } 12 | 13 | /// 14 | /// Gets the position of the argument. 15 | /// 16 | int Position { get; } 17 | } -------------------------------------------------------------------------------- /src/Spectre.Console.Cli/Help/ICommandModel.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Cli.Help; 2 | 3 | /// 4 | /// Represents a command model. 5 | /// 6 | public interface ICommandModel : ICommandContainer 7 | { 8 | /// 9 | /// Gets the name of the application. 10 | /// 11 | string ApplicationName { get; } 12 | 13 | /// 14 | /// Gets the version of the application. 15 | /// 16 | string? ApplicationVersion { get; } 17 | } 18 | -------------------------------------------------------------------------------- /src/Spectre.Console.Cli/IBranchConfigurator.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Cli; 2 | 3 | /// 4 | /// Represents a branch configurator. 5 | /// 6 | public interface IBranchConfigurator 7 | { 8 | /// 9 | /// Adds an alias (an alternative name) to the branch being configured. 10 | /// 11 | /// The alias to add to the branch being configured. 12 | /// The same instance so that multiple calls can be chained. 13 | IBranchConfigurator WithAlias(string name); 14 | } -------------------------------------------------------------------------------- /src/Spectre.Console.Cli/ICommandLimiterOfT.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Cli; 2 | 3 | /// 4 | /// Represents a command limiter. 5 | /// 6 | /// The type of the settings to limit to. 7 | /// 8 | public interface ICommandLimiter : ICommand 9 | where TSettings : CommandSettings 10 | { 11 | } -------------------------------------------------------------------------------- /src/Spectre.Console.Cli/IRemainingArguments.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Cli; 2 | 3 | /// 4 | /// Represents the remaining arguments. 5 | /// 6 | public interface IRemainingArguments 7 | { 8 | /// 9 | /// Gets the parsed remaining arguments. 10 | /// 11 | ILookup Parsed { get; } 12 | 13 | /// 14 | /// Gets the raw, non-parsed remaining arguments. 15 | /// This is normally everything after the `--` delimiter. 16 | /// 17 | IReadOnlyList Raw { get; } 18 | } -------------------------------------------------------------------------------- /src/Spectre.Console.Cli/ITypeResolver.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Cli; 2 | 3 | /// 4 | /// Represents a type resolver. 5 | /// 6 | public interface ITypeResolver 7 | { 8 | /// 9 | /// Resolves an instance of the specified type. 10 | /// 11 | /// The type to resolve. 12 | /// An instance of the specified type, or null if no registration for the specified type exists. 13 | object? Resolve(Type? type); 14 | } -------------------------------------------------------------------------------- /src/Spectre.Console.Cli/Internal/Collections/IMultiMap.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Cli; 2 | 3 | /// 4 | /// Representation of a multi map. 5 | /// 6 | internal interface IMultiMap 7 | { 8 | /// 9 | /// Adds a key and a value to the multi map. 10 | /// 11 | /// The pair to add. 12 | void Add((object? Key, object? Value) pair); 13 | } -------------------------------------------------------------------------------- /src/Spectre.Console.Cli/Internal/CommandPart.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Cli; 2 | 3 | internal enum CommandPart 4 | { 5 | CommandName, 6 | LongOption, 7 | } -------------------------------------------------------------------------------- /src/Spectre.Console.Cli/Internal/Configuration/BranchConfigurator.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Cli; 2 | 3 | internal sealed class BranchConfigurator : IBranchConfigurator 4 | { 5 | public ConfiguredCommand Command { get; } 6 | 7 | public BranchConfigurator(ConfiguredCommand command) 8 | { 9 | Command = command; 10 | } 11 | 12 | public IBranchConfigurator WithAlias(string alias) 13 | { 14 | Command.Aliases.Add(alias); 15 | return this; 16 | } 17 | } -------------------------------------------------------------------------------- /src/Spectre.Console.Cli/Internal/Extensions/EnumerableExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Cli; 2 | 3 | internal static class EnumerableExtensions 4 | { 5 | public static IReadOnlyList ToSafeReadOnlyList(this IEnumerable source) 6 | { 7 | return source switch 8 | { 9 | null => new List(), 10 | IReadOnlyList list => list, 11 | _ => source.ToList(), 12 | }; 13 | } 14 | } -------------------------------------------------------------------------------- /src/Spectre.Console.Cli/Internal/Extensions/StringExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Cli; 2 | 3 | internal static class StringExtensions 4 | { 5 | internal static int OrdinalIndexOf(this string text, char token) 6 | { 7 | #if NETSTANDARD2_0 8 | return text.IndexOf(token); 9 | #else 10 | return text.IndexOf(token, System.StringComparison.Ordinal); 11 | #endif 12 | } 13 | } -------------------------------------------------------------------------------- /src/Spectre.Console.Cli/Internal/Modelling/ParameterKind.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Cli; 2 | 3 | internal enum ParameterKind 4 | { 5 | [Description("flag")] 6 | Flag = 0, 7 | 8 | [Description("scalar")] 9 | Scalar = 1, 10 | 11 | [Description("vector")] 12 | Vector = 2, 13 | 14 | [Description("flagvalue")] 15 | FlagWithValue = 3, 16 | 17 | [Description("pair")] 18 | Pair = 4, 19 | } -------------------------------------------------------------------------------- /src/Spectre.Console.Cli/Internal/Parsing/CommandTreeParserResult.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Cli; 2 | 3 | // Consider removing this in favor for value tuples at some point. 4 | internal sealed class CommandTreeParserResult 5 | { 6 | public CommandTree? Tree { get; } 7 | public IRemainingArguments Remaining { get; } 8 | 9 | public CommandTreeParserResult(CommandTree? tree, IRemainingArguments remaining) 10 | { 11 | Tree = tree; 12 | Remaining = remaining; 13 | } 14 | } -------------------------------------------------------------------------------- /src/Spectre.Console.Cli/Internal/Parsing/MappedCommandParameter.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Cli; 2 | 3 | // Consider removing this in favor for value tuples at some point. 4 | internal sealed class MappedCommandParameter 5 | { 6 | public CommandParameter Parameter { get; } 7 | public string? Value { get; } 8 | 9 | public MappedCommandParameter(CommandParameter parameter, string? value) 10 | { 11 | Parameter = parameter; 12 | Value = value; 13 | } 14 | } -------------------------------------------------------------------------------- /src/Spectre.Console.Cli/Internal/ParsingMode.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Cli; 2 | 3 | internal enum ParsingMode 4 | { 5 | Relaxed = 0, 6 | Strict = 1, 7 | } -------------------------------------------------------------------------------- /src/Spectre.Console.Cli/Internal/RemainingArguments.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Cli; 2 | 3 | internal sealed class RemainingArguments : IRemainingArguments 4 | { 5 | public IReadOnlyList Raw { get; } 6 | public ILookup Parsed { get; } 7 | 8 | public RemainingArguments( 9 | ILookup remaining, 10 | IReadOnlyList raw) 11 | { 12 | Parsed = remaining; 13 | Raw = raw; 14 | } 15 | } -------------------------------------------------------------------------------- /src/Spectre.Console.Cli/Internal/StringWriterWithEncoding.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Cli; 2 | 3 | internal sealed class StringWriterWithEncoding : StringWriter 4 | { 5 | public override Encoding Encoding { get; } 6 | 7 | public StringWriterWithEncoding(Encoding encoding) 8 | { 9 | Encoding = encoding ?? throw new ArgumentNullException(nameof(encoding)); 10 | } 11 | } -------------------------------------------------------------------------------- /src/Spectre.Console.Cli/Internal/VersionHelper.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Cli; 2 | 3 | internal static class VersionHelper 4 | { 5 | public static string GetVersion(Assembly? assembly) 6 | { 7 | return assembly? 8 | .GetCustomAttribute()? 9 | .InformationalVersion ?? "?"; 10 | } 11 | } -------------------------------------------------------------------------------- /src/Spectre.Console.Testing/.editorconfig: -------------------------------------------------------------------------------- 1 | root = false 2 | 3 | [*.cs] 4 | -------------------------------------------------------------------------------- /src/Spectre.Console.Testing/Extensions/ShouldlyExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | internal static class ShouldlyExtensions 4 | { 5 | [DebuggerStepThrough] 6 | public static T And(this T item, Action action) 7 | { 8 | if (action == null) 9 | { 10 | throw new ArgumentNullException(nameof(action)); 11 | } 12 | 13 | action(item); 14 | return item; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Spectre.Console.Testing/Internal/NoopCursor.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Testing; 2 | 3 | internal sealed class NoopCursor : IAnsiConsoleCursor 4 | { 5 | public void Move(CursorDirection direction, int steps) 6 | { 7 | } 8 | 9 | public void SetPosition(int column, int line) 10 | { 11 | } 12 | 13 | public void Show(bool show) 14 | { 15 | } 16 | } -------------------------------------------------------------------------------- /src/Spectre.Console.Testing/Internal/NoopExclusivityMode.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Testing; 2 | 3 | internal sealed class NoopExclusivityMode : IExclusivityMode 4 | { 5 | public T Run(Func func) 6 | { 7 | return func(); 8 | } 9 | 10 | public async Task RunAsync(Func> func) 11 | { 12 | return await func().ConfigureAwait(false); 13 | } 14 | } -------------------------------------------------------------------------------- /src/Spectre.Console.Testing/Properties/Usings.cs: -------------------------------------------------------------------------------- 1 | global using System; 2 | global using System.Collections.Generic; 3 | global using System.Diagnostics; 4 | global using System.IO; 5 | global using System.Linq; 6 | global using System.Threading; 7 | global using System.Threading.Tasks; 8 | global using Spectre.Console.Cli; 9 | global using Spectre.Console.Rendering; -------------------------------------------------------------------------------- /src/Spectre.Console/AnsiConsole.Live.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// A console capable of writing ANSI escape sequences. 5 | /// 6 | public static partial class AnsiConsole 7 | { 8 | /// 9 | /// Creates a new instance. 10 | /// 11 | /// The target renderable to update. 12 | /// A instance. 13 | public static LiveDisplay Live(IRenderable target) 14 | { 15 | return Console.Live(target); 16 | } 17 | } -------------------------------------------------------------------------------- /src/Spectre.Console/AnsiConsole.Screen.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// A console capable of writing ANSI escape sequences. 5 | /// 6 | public static partial class AnsiConsole 7 | { 8 | /// 9 | /// Switches to an alternate screen buffer if the terminal supports it. 10 | /// 11 | /// The action to execute within the alternate screen buffer. 12 | public static void AlternateScreen(Action action) 13 | { 14 | Console.AlternateScreen(action); 15 | } 16 | } -------------------------------------------------------------------------------- /src/Spectre.Console/AnsiSupport.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// Determines ANSI escape sequence support. 5 | /// 6 | public enum AnsiSupport 7 | { 8 | /// 9 | /// ANSI escape sequence support should 10 | /// be detected by the system. 11 | /// 12 | Detect = 0, 13 | 14 | /// 15 | /// ANSI escape sequences are supported. 16 | /// 17 | Yes = 1, 18 | 19 | /// 20 | /// ANSI escape sequences are not supported. 21 | /// 22 | No = 2, 23 | } -------------------------------------------------------------------------------- /src/Spectre.Console/CursorDirection.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// Represents cursor direction. 5 | /// 6 | public enum CursorDirection 7 | { 8 | /// 9 | /// Moves cursor up. 10 | /// 11 | Up, 12 | 13 | /// 14 | /// Moves cursor down. 15 | /// 16 | Down, 17 | 18 | /// 19 | /// Moves cursor left. 20 | /// 21 | Left, 22 | 23 | /// 24 | /// Moves cursor right. 25 | /// 26 | Right, 27 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Enrichment/CI/AppVeyorEnricher.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Enrichment; 2 | 3 | internal sealed class AppVeyorEnricher : IProfileEnricher 4 | { 5 | public string Name => "AppVeyor"; 6 | 7 | public bool Enabled(IDictionary environmentVariables) 8 | { 9 | return environmentVariables.ContainsKey("APPVEYOR"); 10 | } 11 | 12 | public void Enrich(Profile profile) 13 | { 14 | profile.Capabilities.Interactive = false; 15 | } 16 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Enrichment/CI/BambooEnricher.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Enrichment; 2 | 3 | internal sealed class BambooEnricher : IProfileEnricher 4 | { 5 | public string Name => "Bamboo"; 6 | 7 | public bool Enabled(IDictionary environmentVariables) 8 | { 9 | return environmentVariables.ContainsKey("bamboo_buildNumber"); 10 | } 11 | 12 | public void Enrich(Profile profile) 13 | { 14 | profile.Capabilities.Interactive = false; 15 | } 16 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Enrichment/CI/BitriseEnricher.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Enrichment; 2 | 3 | internal sealed class BitriseEnricher : IProfileEnricher 4 | { 5 | public string Name => "Bitrise"; 6 | 7 | public bool Enabled(IDictionary environmentVariables) 8 | { 9 | return environmentVariables.ContainsKey("BITRISE_BUILD_URL"); 10 | } 11 | 12 | public void Enrich(Profile profile) 13 | { 14 | profile.Capabilities.Interactive = false; 15 | } 16 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Enrichment/CI/ContinuaEnricher.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Enrichment; 2 | 3 | internal sealed class ContinuaEnricher : IProfileEnricher 4 | { 5 | public string Name => "ContinuaCI"; 6 | 7 | public bool Enabled(IDictionary environmentVariables) 8 | { 9 | return environmentVariables.ContainsKey("ContinuaCI.Version"); 10 | } 11 | 12 | public void Enrich(Profile profile) 13 | { 14 | profile.Capabilities.Interactive = false; 15 | } 16 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Enrichment/CI/GoCDEnricher.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Enrichment; 2 | 3 | internal sealed class GoCDEnricher : IProfileEnricher 4 | { 5 | public string Name => "GoCD"; 6 | 7 | public bool Enabled(IDictionary environmentVariables) 8 | { 9 | return environmentVariables.ContainsKey("GO_SERVER_URL"); 10 | } 11 | 12 | public void Enrich(Profile profile) 13 | { 14 | profile.Capabilities.Interactive = false; 15 | } 16 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Enrichment/CI/JenkinsEnricher.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Enrichment; 2 | 3 | internal sealed class JenkinsEnricher : IProfileEnricher 4 | { 5 | public string Name => "Jenkins"; 6 | 7 | public bool Enabled(IDictionary environmentVariables) 8 | { 9 | return environmentVariables.ContainsKey("JENKINS_URL"); 10 | } 11 | 12 | public void Enrich(Profile profile) 13 | { 14 | profile.Capabilities.Interactive = false; 15 | } 16 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Enrichment/CI/TeamCityEnricher.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Enrichment; 2 | 3 | internal sealed class TeamCityEnricher : IProfileEnricher 4 | { 5 | public string Name => "TeamCity"; 6 | 7 | public bool Enabled(IDictionary environmentVariables) 8 | { 9 | return environmentVariables.ContainsKey("TEAMCITY_VERSION"); 10 | } 11 | 12 | public void Enrich(Profile profile) 13 | { 14 | profile.Capabilities.Interactive = false; 15 | } 16 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Enrichment/CI/TfsEnricher.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Enrichment; 2 | 3 | internal sealed class TfsEnricher : IProfileEnricher 4 | { 5 | public string Name => "TFS"; 6 | 7 | public bool Enabled(IDictionary environmentVariables) 8 | { 9 | return environmentVariables.ContainsKey("TF_BUILD"); 10 | } 11 | 12 | public void Enrich(Profile profile) 13 | { 14 | profile.Capabilities.Interactive = false; 15 | } 16 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Enrichment/CI/TravisEnricher.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Enrichment; 2 | 3 | internal sealed class TravisEnricher : IProfileEnricher 4 | { 5 | public string Name => "Travis"; 6 | 7 | public bool Enabled(IDictionary environmentVariables) 8 | { 9 | return environmentVariables.ContainsKey("TRAVIS"); 10 | } 11 | 12 | public void Enrich(Profile profile) 13 | { 14 | profile.Capabilities.Interactive = false; 15 | } 16 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Extensions/DictionaryExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | internal static class DictionaryExtensions 4 | { 5 | public static void Deconstruct(this KeyValuePair tuple, out T1 key, out T2 value) 6 | { 7 | key = tuple.Key; 8 | value = tuple.Value; 9 | } 10 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Extensions/Int32Extensions.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | internal static class Int32Extensions 4 | { 5 | public static int Clamp(this int value, int min, int max) 6 | { 7 | if (value <= min) 8 | { 9 | return min; 10 | } 11 | 12 | if (value >= max) 13 | { 14 | return max; 15 | } 16 | 17 | return value; 18 | } 19 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Extensions/RenderOptionsExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | internal static class RenderOptionsExtensions 4 | { 5 | public static BoxBorder GetSafeBorder(this RenderOptions options, T border) 6 | where T : IHasBoxBorder, IHasBorder 7 | { 8 | return BoxExtensions.GetSafeBorder(border.Border, !options.Unicode && border.UseSafeBorder); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Spectre.Console/Extensions/StackExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | internal static class StackExtensions 4 | { 5 | public static void PushRange(this Stack stack, IEnumerable source) 6 | { 7 | if (stack is null) 8 | { 9 | throw new ArgumentNullException(nameof(stack)); 10 | } 11 | 12 | if (source != null) 13 | { 14 | foreach (var item in source) 15 | { 16 | stack.Push(item); 17 | } 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/Spectre.Console/HorizontalAlignment.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// Represents horizontal alignment. 5 | /// 6 | public enum HorizontalAlignment 7 | { 8 | /// 9 | /// Left aligned. 10 | /// 11 | Left, 12 | 13 | /// 14 | /// Centered. 15 | /// 16 | Center, 17 | 18 | /// 19 | /// Right aligned. 20 | /// 21 | Right, 22 | } 23 | -------------------------------------------------------------------------------- /src/Spectre.Console/IAlignable.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// Represents something that is alignable. 5 | /// 6 | public interface IAlignable 7 | { 8 | /// 9 | /// Gets or sets the alignment. 10 | /// 11 | Justify? Alignment { get; set; } 12 | } 13 | -------------------------------------------------------------------------------- /src/Spectre.Console/IColumn.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// Represents a column. 5 | /// 6 | public interface IColumn : IAlignable, IPaddable 7 | { 8 | /// 9 | /// Gets or sets a value indicating whether 10 | /// or not wrapping should be prevented. 11 | /// 12 | bool NoWrap { get; set; } 13 | 14 | /// 15 | /// Gets or sets the width of the column. 16 | /// 17 | int? Width { get; set; } 18 | } -------------------------------------------------------------------------------- /src/Spectre.Console/IExpandable.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// Represents something that is expandable. 5 | /// 6 | public interface IExpandable 7 | { 8 | /// 9 | /// Gets or sets a value indicating whether or not the object should 10 | /// expand to the available space. If false, the object's 11 | /// width will be auto calculated. 12 | /// 13 | bool Expand { get; set; } 14 | } -------------------------------------------------------------------------------- /src/Spectre.Console/IHasBorder.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// Represents something that has a border. 5 | /// 6 | public interface IHasBorder 7 | { 8 | /// 9 | /// Gets or sets a value indicating whether or not to use 10 | /// a "safe" border on legacy consoles that might not be able 11 | /// to render non-ASCII characters. 12 | /// 13 | bool UseSafeBorder { get; set; } 14 | 15 | /// 16 | /// Gets or sets the box style. 17 | /// 18 | public Style? BorderStyle { get; set; } 19 | } -------------------------------------------------------------------------------- /src/Spectre.Console/IHasBoxBorder.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// Represents something that has a box border. 5 | /// 6 | public interface IHasBoxBorder 7 | { 8 | /// 9 | /// Gets or sets the box. 10 | /// 11 | public BoxBorder Border { get; set; } 12 | } -------------------------------------------------------------------------------- /src/Spectre.Console/IHasCulture.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// Represents something that has a culture. 5 | /// 6 | public interface IHasCulture 7 | { 8 | /// 9 | /// Gets or sets the culture. 10 | /// 11 | CultureInfo? Culture { get; set; } 12 | } -------------------------------------------------------------------------------- /src/Spectre.Console/IHasJustification.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// Represents something that has justification. 5 | /// 6 | public interface IHasJustification 7 | { 8 | /// 9 | /// Gets or sets the justification. 10 | /// 11 | Justify? Justification { get; set; } 12 | } -------------------------------------------------------------------------------- /src/Spectre.Console/IHasTableBorder.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// Represents something that has a border. 5 | /// 6 | public interface IHasTableBorder : IHasBorder 7 | { 8 | /// 9 | /// Gets or sets the border. 10 | /// 11 | public TableBorder Border { get; set; } 12 | } -------------------------------------------------------------------------------- /src/Spectre.Console/IHasTreeNodes.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// Represents something that has tree nodes. 5 | /// 6 | public interface IHasTreeNodes 7 | { 8 | /// 9 | /// Gets the tree's child nodes. 10 | /// 11 | List Nodes { get; } 12 | } -------------------------------------------------------------------------------- /src/Spectre.Console/IHasVisibility.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// Represents something that can be hidden. 5 | /// 6 | public interface IHasVisibility 7 | { 8 | /// 9 | /// Gets or sets a value indicating whether or not the object should 10 | /// be visible or not. 11 | /// 12 | bool IsVisible { get; set; } 13 | } -------------------------------------------------------------------------------- /src/Spectre.Console/IOverflowable.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// Represents something that can overflow. 5 | /// 6 | public interface IOverflowable 7 | { 8 | /// 9 | /// Gets or sets the text overflow strategy. 10 | /// 11 | Overflow? Overflow { get; set; } 12 | } -------------------------------------------------------------------------------- /src/Spectre.Console/IPaddable.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// Represents something that is paddable. 5 | /// 6 | public interface IPaddable 7 | { 8 | /// 9 | /// Gets or sets the padding. 10 | /// 11 | public Padding? Padding { get; set; } 12 | } -------------------------------------------------------------------------------- /src/Spectre.Console/InteractionSupport.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// Determines interactivity support. 5 | /// 6 | public enum InteractionSupport 7 | { 8 | /// 9 | /// Interaction support should be 10 | /// detected by the system. 11 | /// 12 | Detect = 0, 13 | 14 | /// 15 | /// Interactivity is supported. 16 | /// 17 | Yes = 1, 18 | 19 | /// 20 | /// Interactivity is not supported. 21 | /// 22 | No = 2, 23 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Internal/Constants.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | internal static class Constants 4 | { 5 | public const int DefaultTerminalWidth = 80; 6 | public const int DefaultTerminalHeight = 24; 7 | 8 | public const string EmptyLink = "https://emptylink"; 9 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Internal/Extensions/CharExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Internal; 2 | 3 | internal static partial class CharExtensions 4 | { 5 | public static bool IsDigit(this char character, int min = 0) 6 | { 7 | return char.IsDigit(character) && character >= (char)min; 8 | } 9 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Internal/FileSizeBase.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// Determines possible file size base prefixes. (base 2/base 10). 5 | /// 6 | public enum FileSizeBase 7 | { 8 | /// 9 | /// The SI prefix definition (base 10) of kilobyte, megabyte, etc. 10 | /// 11 | Decimal = 1000, 12 | 13 | /// 14 | /// The IEC binary prefix definition (base 2) of kibibyte, mebibyte, etc. 15 | /// 16 | Binary = 1024, 17 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Internal/FileSizePrefix.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | internal enum FileSizePrefix 4 | { 5 | None = 0, 6 | Kilo = 1, 7 | Mega = 2, 8 | Giga = 3, 9 | Tera = 4, 10 | Peta = 5, 11 | Exa = 6, 12 | Zetta = 7, 13 | Yotta = 8, 14 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Internal/IRatioResolvable.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// Represents something that can be used to resolve ratios. 5 | /// 6 | internal interface IRatioResolvable 7 | { 8 | /// 9 | /// Gets the ratio. 10 | /// 11 | int Ratio { get; } 12 | 13 | /// 14 | /// Gets the size. 15 | /// 16 | int? Size { get; } 17 | 18 | /// 19 | /// Gets the minimum size. 20 | /// 21 | int MinimumSize { get; } 22 | } 23 | -------------------------------------------------------------------------------- /src/Spectre.Console/Internal/Polyfill/CancellationToken.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD2_0 2 | namespace Spectre.Console 3 | { 4 | internal static class CancellationTokenHelpers 5 | { 6 | public static Task CancelAsync(this CancellationTokenSource cts) 7 | { 8 | cts.Cancel(); 9 | return Task.CompletedTask; 10 | } 11 | } 12 | } 13 | #endif -------------------------------------------------------------------------------- /src/Spectre.Console/Internal/Polyfill/EnumHelpers.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | internal static class EnumUtils 4 | { 5 | public static T[] GetValues() 6 | where T : struct, Enum 7 | { 8 | return 9 | #if NET6_0_OR_GREATER 10 | Enum.GetValues(); 11 | #else 12 | (T[])Enum.GetValues(typeof(T)); 13 | #endif 14 | } 15 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Internal/Polyfill/IsExternalInit.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD2_0 2 | using System.ComponentModel; 3 | 4 | namespace System.Runtime.CompilerServices 5 | { 6 | /// 7 | /// Reserved to be used by the compiler for tracking metadata. 8 | /// This class should not be used by developers in source code. 9 | /// 10 | [EditorBrowsable(EditorBrowsableState.Never)] 11 | internal static class IsExternalInit 12 | { 13 | } 14 | } 15 | #endif -------------------------------------------------------------------------------- /src/Spectre.Console/Internal/Text/Encoding/EncoderCapabilities.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Internal; 2 | 3 | internal sealed class EncoderCapabilities : IReadOnlyCapabilities 4 | { 5 | public ColorSystem ColorSystem { get; } 6 | 7 | public bool Ansi => false; 8 | public bool Links => false; 9 | public bool Legacy => false; 10 | public bool IsTerminal => false; 11 | public bool Interactive => false; 12 | public bool Unicode => true; 13 | 14 | public EncoderCapabilities(ColorSystem colors) 15 | { 16 | ColorSystem = colors; 17 | } 18 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Internal/Text/Markup/MarkupToken.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | internal sealed class MarkupToken 4 | { 5 | public MarkupTokenKind Kind { get; } 6 | public string Value { get; } 7 | public int Position { get; set; } 8 | 9 | public MarkupToken(MarkupTokenKind kind, string value, int position) 10 | { 11 | Kind = kind; 12 | Value = value ?? throw new ArgumentNullException(nameof(value)); 13 | Position = position; 14 | } 15 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Internal/Text/Markup/MarkupTokenKind.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | internal enum MarkupTokenKind 4 | { 5 | Text = 0, 6 | Open, 7 | Close, 8 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Justify.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// Represents text justification. 5 | /// 6 | public enum Justify 7 | { 8 | /// 9 | /// Left justified. 10 | /// 11 | Left = 0, 12 | 13 | /// 14 | /// Right justified. 15 | /// 16 | Right = 1, 17 | 18 | /// 19 | /// Centered. 20 | /// 21 | Center = 2, 22 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Live/Progress/ProgressRenderer.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | internal abstract class ProgressRenderer : IRenderHook 4 | { 5 | public abstract TimeSpan RefreshRate { get; } 6 | 7 | public virtual void Started() 8 | { 9 | } 10 | 11 | public virtual void Completed(bool clear) 12 | { 13 | } 14 | 15 | public abstract void Update(ProgressContext context); 16 | public abstract IEnumerable Process(RenderOptions options, IEnumerable renderables); 17 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Live/Progress/ProgressSample.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | internal readonly struct ProgressSample 4 | { 5 | public double Value { get; } 6 | public DateTime Timestamp { get; } 7 | 8 | public ProgressSample(DateTime timestamp, double value) 9 | { 10 | Timestamp = timestamp; 11 | Value = value; 12 | } 13 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Overflow.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// Represents text overflow. 5 | /// 6 | public enum Overflow 7 | { 8 | /// 9 | /// Put any excess characters on the next line. 10 | /// 11 | Fold = 0, 12 | 13 | /// 14 | /// Truncates the text at the end of the line. 15 | /// 16 | Crop = 1, 17 | 18 | /// 19 | /// Truncates the text at the end of the line and 20 | /// also inserts an ellipsis character. 21 | /// 22 | Ellipsis = 2, 23 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Prompts/DefaultPromptValue.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | internal sealed class DefaultPromptValue 4 | { 5 | public T Value { get; } 6 | 7 | public DefaultPromptValue(T value) 8 | { 9 | Value = value; 10 | } 11 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Prompts/ISelectionItem.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// Represent a selection item. 5 | /// 6 | /// The data type. 7 | public interface ISelectionItem 8 | where T : notnull 9 | { 10 | /// 11 | /// Adds a child to the item. 12 | /// 13 | /// The child to add. 14 | /// A new instance representing the child. 15 | ISelectionItem AddChild(T child); 16 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Prompts/List/ListPromptInputResult.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | internal enum ListPromptInputResult 4 | { 5 | None = 0, 6 | Refresh = 1, 7 | Submit = 2, 8 | Abort = 3, 9 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Prompts/SelectionType.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// Represents how selections are made in a hierarchical prompt. 5 | /// 6 | public enum SelectionMode 7 | { 8 | /// 9 | /// Will only return lead nodes in results. 10 | /// 11 | Leaf = 0, 12 | 13 | /// 14 | /// Allows selection of parent nodes, but each node 15 | /// is independent of its parent and children. 16 | /// 17 | Independent = 1, 18 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Rendering/Borders/Boxes/NoBoxBorder.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Rendering; 2 | 3 | /// 4 | /// Represents an invisible border. 5 | /// 6 | public sealed class NoBoxBorder : BoxBorder 7 | { 8 | /// 9 | public override string GetPart(BoxBorderPart part) 10 | { 11 | return " "; 12 | } 13 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Rendering/Borders/Tables/NoTableBorder.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Rendering; 2 | 3 | /// 4 | /// Represents an invisible border. 5 | /// 6 | public sealed class NoTableBorder : TableBorder 7 | { 8 | /// 9 | public override bool Visible => false; 10 | 11 | /// 12 | public override bool SupportsRowSeparator => false; 13 | 14 | /// 15 | public override string GetPart(TableBorderPart part) 16 | { 17 | return " "; 18 | } 19 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Rendering/IHasDirtyState.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Rendering; 2 | 3 | /// 4 | /// Represents something that can be dirty. 5 | /// 6 | public interface IHasDirtyState 7 | { 8 | /// 9 | /// Gets a value indicating whether the object is dirty. 10 | /// 11 | bool IsDirty { get; } 12 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Rendering/IRenderHook.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Rendering; 2 | 3 | /// 4 | /// Represents a render hook. 5 | /// 6 | public interface IRenderHook 7 | { 8 | /// 9 | /// Processes the specified renderables. 10 | /// 11 | /// The render options. 12 | /// The renderables to process. 13 | /// The processed renderables. 14 | IEnumerable Process(RenderOptions options, IEnumerable renderables); 15 | } -------------------------------------------------------------------------------- /src/Spectre.Console/VerticalAlignment.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// Represents vertical alignment. 5 | /// 6 | public enum VerticalAlignment 7 | { 8 | /// 9 | /// Top aligned. 10 | /// 11 | Top, 12 | 13 | /// 14 | /// Middle aligned. 15 | /// 16 | Middle, 17 | 18 | /// 19 | /// Bottom aligned. 20 | /// 21 | Bottom, 22 | } 23 | -------------------------------------------------------------------------------- /src/Spectre.Console/VerticalOverflow.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// Represents vertical overflow. 5 | /// 6 | public enum VerticalOverflow 7 | { 8 | /// 9 | /// Crop overflow. 10 | /// 11 | Crop = 0, 12 | 13 | /// 14 | /// Add an ellipsis at the end. 15 | /// 16 | Ellipsis = 1, 17 | 18 | /// 19 | /// Do not do anything about overflow. 20 | /// 21 | Visible = 2, 22 | } -------------------------------------------------------------------------------- /src/Spectre.Console/VerticalOverflowCropping.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// Represent vertical overflow cropping. 5 | /// 6 | public enum VerticalOverflowCropping 7 | { 8 | /// 9 | /// Crops the top. 10 | /// 11 | Top = 0, 12 | 13 | /// 14 | /// Crops the bottom. 15 | /// 16 | Bottom = 1, 17 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Widgets/Charts/IBarChartItem.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// Represents a bar chart item. 5 | /// 6 | public interface IBarChartItem 7 | { 8 | /// 9 | /// Gets the item label. 10 | /// 11 | string Label { get; } 12 | 13 | /// 14 | /// Gets the item value. 15 | /// 16 | double Value { get; } 17 | 18 | /// 19 | /// Gets the item color. 20 | /// 21 | Color? Color { get; } 22 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Widgets/Charts/IBreakdownChartItem.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// Represents a breakdown chart item. 5 | /// 6 | public interface IBreakdownChartItem 7 | { 8 | /// 9 | /// Gets the item label. 10 | /// 11 | string Label { get; } 12 | 13 | /// 14 | /// Gets the item value. 15 | /// 16 | double Value { get; } 17 | 18 | /// 19 | /// Gets the item color. 20 | /// 21 | Color Color { get; } 22 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Widgets/CircularTreeException.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | /// 4 | /// Indicates that the tree being rendered includes a cycle, and cannot be rendered. 5 | /// 6 | public sealed class CircularTreeException : Exception 7 | { 8 | internal CircularTreeException(string message) 9 | : base(message) 10 | { 11 | } 12 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Widgets/Figlet/FigletHeader.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | internal sealed class FigletHeader 4 | { 5 | public char Hardblank { get; set; } 6 | public int Height { get; set; } 7 | public int Baseline { get; set; } 8 | public int MaxLength { get; set; } 9 | public int OldLayout { get; set; } 10 | public int CommentLines { get; set; } 11 | } -------------------------------------------------------------------------------- /src/Spectre.Console/Widgets/Layout/LayoutRender.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console; 2 | 3 | [DebuggerDisplay("{Region,nq}")] 4 | internal sealed class LayoutRender 5 | { 6 | public Region Region { get; } 7 | public List Render { get; } 8 | 9 | public LayoutRender(Region region, List render) 10 | { 11 | Region = region; 12 | Render = render ?? throw new ArgumentNullException(nameof(render)); 13 | } 14 | } -------------------------------------------------------------------------------- /src/Tests/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 4 | false 5 | true 6 | true 7 | $(MSBuildThisFileDirectory)\..\..\resources\spectre.snk 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Constants.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests; 2 | 3 | public static class Constants 4 | { 5 | public static string[] VersionCommand { get; } = 6 | new[] 7 | { 8 | CliConstants.Commands.Branch, 9 | CliConstants.Commands.Version, 10 | }; 11 | 12 | public static string[] XmlDocCommand { get; } = 13 | new[] 14 | { 15 | CliConstants.Commands.Branch, 16 | CliConstants.Commands.XmlDoc, 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Commands/AnimalCommand.cs: -------------------------------------------------------------------------------- 1 | using SystemConsole = System.Console; 2 | 3 | namespace Spectre.Console.Tests.Data; 4 | 5 | public abstract class AnimalCommand : Command 6 | where TSettings : CommandSettings 7 | { 8 | } 9 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Commands/CatCommand.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | public class CatCommand : AnimalCommand 4 | { 5 | public override int Execute(CommandContext context, CatSettings settings) 6 | { 7 | return 0; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Commands/EmptyCommand.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | public sealed class EmptyCommand : Command 4 | { 5 | public override int Execute(CommandContext context, EmptyCommandSettings settings) 6 | { 7 | return 0; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Commands/GenericCommand.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | public sealed class GenericCommand : Command 4 | where TSettings : CommandSettings 5 | { 6 | public override int Execute(CommandContext context, TSettings settings) 7 | { 8 | return 0; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Commands/GiraffeCommand.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | [Description("The giraffe command.")] 4 | public sealed class GiraffeCommand : Command 5 | { 6 | public override int Execute(CommandContext context, GiraffeSettings settings) 7 | { 8 | return 0; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Commands/GreeterCommand.cs: -------------------------------------------------------------------------------- 1 | using Spectre.Console; 2 | 3 | public class GreeterCommand : Command 4 | { 5 | private readonly IAnsiConsole _console; 6 | 7 | public GreeterCommand(IAnsiConsole console) 8 | { 9 | _console = console; 10 | } 11 | 12 | public override int Execute(CommandContext context, OptionalArgumentWithDefaultValueSettings settings) 13 | { 14 | _console.WriteLine(settings.Greeting); 15 | return 0; 16 | } 17 | } -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Commands/HiddenOptionsCommand.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | public sealed class HiddenOptionsCommand : Command 4 | { 5 | public override int Execute(CommandContext context, HiddenOptionSettings settings) 6 | { 7 | return 0; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Commands/HorseCommand.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | [Description("The horse command.")] 4 | public class HorseCommand : AnimalCommand 5 | { 6 | public override int Execute(CommandContext context, HorseSettings settings) 7 | { 8 | return 0; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Commands/InvalidCommand.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | public sealed class InvalidCommand : Command 4 | { 5 | public override int Execute(CommandContext context, InvalidSettings settings) 6 | { 7 | return 0; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Commands/LionCommand.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | [Description("The lion command.")] 4 | public class LionCommand : AnimalCommand 5 | { 6 | public override int Execute(CommandContext context, LionSettings settings) 7 | { 8 | return 0; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Commands/NoDescriptionCommand.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | public sealed class NoDescriptionCommand : Command 4 | { 5 | [CommandOption("-f|--foo ")] 6 | public int Foo { get; set; } 7 | 8 | public override int Execute(CommandContext context, EmptyCommandSettings settings) 9 | { 10 | return 0; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Commands/OptionVectorCommand.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | public class OptionVectorCommand : Command 4 | { 5 | public override int Execute(CommandContext context, OptionVectorSettings settings) 6 | { 7 | return 0; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Commands/ThrowingCommand.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | public sealed class ThrowingCommand : Command 4 | { 5 | public override int Execute(CommandContext context, ThrowingCommandSettings settings) 6 | { 7 | throw new InvalidOperationException("W00t?"); 8 | } 9 | } -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Commands/TurtleCommand.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | [Description("The turtle command.")] 4 | public class TurtleCommand : AnimalCommand 5 | { 6 | public override int Execute(CommandContext context, TurtleSettings settings) 7 | { 8 | return 0; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Commands/VersionCommand.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | public sealed class VersionCommand : Command 4 | { 5 | private readonly IAnsiConsole _console; 6 | 7 | public VersionCommand(IAnsiConsole console) 8 | { 9 | _console = console; 10 | } 11 | 12 | public override int Execute(CommandContext context, VersionSettings settings) 13 | { 14 | _console.WriteLine($"VersionCommand ran, Version: {settings.Version ?? string.Empty}"); 15 | 16 | return 0; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Converters/CatAgilityConverter.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | public sealed class CatAgilityConverter : TypeConverter 4 | { 5 | public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) 6 | { 7 | if (value is string stringValue) 8 | { 9 | return stringValue.Length; 10 | } 11 | 12 | return base.ConvertFrom(context, culture, value); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Converters/StringToIntegerConverter.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | public sealed class StringToIntegerConverter : TypeConverter 4 | { 5 | public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) 6 | { 7 | if (value is string stringValue) 8 | { 9 | return int.Parse(stringValue, CultureInfo.InvariantCulture); 10 | } 11 | 12 | return base.ConvertFrom(context, culture, value); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Help/RenderMarkupHelpProvider.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Cli.Tests.Data.Help; 2 | 3 | internal class RenderMarkupHelpProvider : HelpProvider 4 | { 5 | protected override bool RenderMarkupInline { get; } = true; 6 | 7 | public RenderMarkupHelpProvider(ICommandAppSettings settings) 8 | : base(settings) 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Settings/ArgumentOrderSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | public sealed class ArgumentOrderSettings : CommandSettings 4 | { 5 | [CommandArgument(0, "[QUX]")] 6 | public int Qux { get; set; } 7 | 8 | [CommandArgument(3, "")] 9 | public int Corgi { get; set; } 10 | 11 | [CommandArgument(1, "")] 12 | public int Bar { get; set; } 13 | 14 | [CommandArgument(2, "")] 15 | public int Baz { get; set; } 16 | 17 | [CommandArgument(0, "")] 18 | public int Foo { get; set; } 19 | } 20 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Settings/ArgumentVectorSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | public class ArgumentVectorSettings : CommandSettings 4 | { 5 | [CommandArgument(0, "")] 6 | public string[] Foo { get; set; } 7 | } 8 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Settings/AsynchronousCommandSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | public sealed class AsynchronousCommandSettings : CommandSettings 4 | { 5 | [CommandOption("--ThrowException")] 6 | [DefaultValue(false)] 7 | public bool ThrowException { get; set; } 8 | } -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Settings/BarCommandSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | public class BarCommandSettings : FooCommandSettings 4 | { 5 | [CommandArgument(0, "")] 6 | [Description("The corgi value.")] 7 | public string Corgi { get; set; } 8 | } 9 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Settings/CatSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | public class CatSettings : MammalSettings 4 | { 5 | [CommandOption("--agility ")] 6 | [TypeConverter(typeof(CatAgilityConverter))] 7 | [DefaultValue(10)] 8 | [Description("The agility between 0 and 100.")] 9 | [PositiveNumberValidator("Agility cannot be negative.")] 10 | public int Agility { get; set; } 11 | } 12 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Settings/FooSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | public class FooCommandSettings : CommandSettings 4 | { 5 | [CommandArgument(0, "[QUX]")] 6 | [Description("The qux value.")] 7 | public string Qux { get; set; } 8 | } 9 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Settings/GiraffeSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | public sealed class GiraffeSettings : MammalSettings 4 | { 5 | [CommandArgument(0, "")] 6 | [Description("The option description.")] 7 | public int Length { get; set; } 8 | } 9 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Settings/HorseSettings.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace Spectre.Console.Tests.Data; 4 | 5 | public class HorseSettings : MammalSettings 6 | { 7 | [CommandOption("-d|--day ")] 8 | public DayOfWeek Day { get; set; } 9 | 10 | [CommandOption("--file")] 11 | [DefaultValue("food.txt")] 12 | public FileInfo File { get; set; } 13 | 14 | [CommandOption("--directory")] 15 | public DirectoryInfo Directory { get; set; } 16 | } -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Settings/InvalidSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | public sealed class InvalidSettings : CommandSettings 4 | { 5 | [CommandOption("-f|--foo [BAR]")] 6 | public string Value { get; set; } 7 | } 8 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Settings/MammalSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | public class MammalSettings : AnimalSettings 4 | { 5 | [CommandOption("-n|-p|--name|--pet-name ")] 6 | public string Name { get; set; } 7 | } 8 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Settings/OptionVectorSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | public class OptionVectorSettings : CommandSettings 4 | { 5 | [CommandOption("--foo")] 6 | public string[] Foo { get; set; } 7 | 8 | [CommandOption("--bar")] 9 | public int[] Bar { get; set; } 10 | } 11 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Settings/ReptileSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | public class ReptileSettings : AnimalSettings 4 | { 5 | [CommandOption("-n|-p|--name|--pet-name ")] 6 | public string Name { get; set; } 7 | } -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Settings/RequiredOptionsSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | public class RequiredOptionsSettings : CommandSettings 4 | { 5 | [CommandOption("--foo ", true)] 6 | [Description("Foos the bars")] 7 | public string Foo { get; set; } 8 | } 9 | 10 | public class RequiredOptionsWithoutDescriptionSettings : CommandSettings 11 | { 12 | [CommandOption("--foo ", true)] 13 | public string Foo { get; set; } 14 | } -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Settings/StringOptionSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | public sealed class StringOptionSettings : CommandSettings 4 | { 5 | [CommandOption("-f|--foo")] 6 | public string Foo { get; set; } 7 | } 8 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Settings/ThrowingCommandSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | public sealed class ThrowingCommandSettings : CommandSettings 4 | { 5 | } 6 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Settings/TurtleSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | public sealed class TurtleSettings : ReptileSettings 4 | { 5 | public TurtleSettings(string name) 6 | { 7 | Name = name; 8 | } 9 | 10 | public override ValidationResult Validate() 11 | { 12 | return Name != "Lonely George" 13 | ? ValidationResult.Error("Only 'Lonely George' is valid name for a turtle!") 14 | : ValidationResult.Success(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Data/Settings/VersionSettings.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Data; 2 | 3 | public sealed class VersionSettings : CommandSettings 4 | { 5 | [CommandOption("-v|--version")] 6 | [Description("The command version")] 7 | public string Version { get; set; } 8 | } -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Arguments/ArgumentCannotContainOptions.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: An error occured when parsing template. 2 | Arguments can not contain options. 3 | 4 | --foo 5 | ^^^^^ Not permitted -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Arguments/InvalidCharacterInOptionName.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: An error occured when parsing template. 2 | Encountered invalid character '$' in option name. 3 | 4 | --f$oo 5 | ^ Invalid character -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Arguments/InvalidCharacterInValueName.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: An error occured when parsing template. 2 | Encountered invalid character '$' in value name. 3 | 4 | -f|--foo 5 | ^ Invalid character -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Arguments/LongOptionMustHaveMoreThanOneCharacter.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: An error occured when parsing template. 2 | Long option names must consist of more than one character. 3 | 4 | --f 5 | ^ Invalid option name -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Arguments/MissingLongAndShortName.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: An error occured when parsing template. 2 | No long or short name for option has been specified. 3 | 4 | 5 | ^^^^^ Missing option. Was this meant to be an argument? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Arguments/MultipleOptionValuesAreNotSupported.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: An error occured when parsing template. 2 | Multiple option values are not supported. 3 | 4 | -f|--foo 5 | ^^^^^ Too many option values -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Arguments/MultipleValuesAreNotSupported.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: An error occured when parsing template. 2 | Multiple values are not supported. 3 | 4 | 5 | ^^^^^ Too many values -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Arguments/OptionNamesCannotStartWithDigit.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: An error occured when parsing template. 2 | Option names cannot start with a digit. 3 | 4 | --1foo 5 | ^^^^ Invalid option name -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Arguments/OptionsMustHaveName.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: An error occured when parsing template. 2 | Options without name are not allowed. 3 | 4 | --foo|- 5 | ^ Missing option name -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Arguments/ShortOptionMustOnlyBeOneCharacter.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: An error occured when parsing template. 2 | Short option names can not be longer than one character. 3 | 4 | --foo|-bar 5 | ^^^ Invalid option name -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Arguments/UnexpectedCharacter.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: An error occured when parsing template. 2 | Encountered unexpected character '$'. 3 | 4 | $ 5 | ^ Unexpected character -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Arguments/UnterminatedValueName.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: An error occured when parsing template. 2 | Encountered unterminated value name 'BAR'. 3 | 4 | --foo|-f 5 | ^^ Missing value name -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Help/ArgumentOrder.Output.verified.txt: -------------------------------------------------------------------------------- 1 | USAGE: 2 | myapp [QUX] [OPTIONS] 3 | 4 | ARGUMENTS: 5 | 6 | 7 | 8 | 9 | [QUX] 10 | 11 | OPTIONS: 12 | -h, --help Prints help information -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Help/Branch_Default_Greeter.Output.verified.txt: -------------------------------------------------------------------------------- 1 | USAGE: 2 | myapp branch [GREETING] [OPTIONS] [COMMAND] 3 | 4 | ARGUMENTS: 5 | [GREETING] 6 | 7 | OPTIONS: 8 | -h, --help Prints help information 9 | 10 | COMMANDS: 11 | greeter -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Help/Command_Hide_Default.Output.verified.txt: -------------------------------------------------------------------------------- 1 | DESCRIPTION: 2 | Contains settings for a cat 3 | 4 | USAGE: 5 | myapp cat [LEGS] [OPTIONS] 6 | 7 | ARGUMENTS: 8 | [LEGS] The number of legs 9 | 10 | OPTIONS: 11 | -h, --help Prints help information 12 | -a, --alive Indicates whether or not the animal is alive 13 | -n, --name 14 | --agility The agility between 0 and 100 15 | 16 | COMMANDS: 17 | lion The lion command -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Help/Custom_Help_Configured_By_Instance.Output.verified.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------- 2 | --- CUSTOM HELP PROVIDER --- 3 | -------------------------------------- 4 | 5 | USAGE: 6 | myapp [OPTIONS] 7 | 8 | OPTIONS: 9 | -h, --help Prints help information 10 | 11 | COMMANDS: 12 | dog The dog command 13 | 14 | Version 1.0 -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Help/Custom_Help_Configured_By_Type.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Help has moved online. Please see: http://www.example.com -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Help/Custom_Help_Registered_By_Instance.Output.verified.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------- 2 | --- CUSTOM HELP PROVIDER --- 3 | -------------------------------------- 4 | 5 | USAGE: 6 | myapp [OPTIONS] 7 | 8 | OPTIONS: 9 | -h, --help Prints help information 10 | 11 | COMMANDS: 12 | dog The dog command 13 | 14 | Version 1.0 -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Help/Custom_Help_Registered_By_Type.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Help has moved online. Please see: http://www.example.com -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Help/Default_Custom_Help_Provider.Output.verified.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------- 2 | --- CUSTOM HELP PROVIDER --- 3 | -------------------------------------- 4 | 5 | USAGE: 6 | myapp [OPTIONS] 7 | 8 | OPTIONS: 9 | -h, --help Prints help information 10 | -v, --version Prints version information 11 | 12 | COMMANDS: 13 | dog The dog command 14 | 15 | Version 1.0 -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Help/Default_Greeter.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Hello World -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Help/Description_No_Trailing_Period.Output.verified.txt: -------------------------------------------------------------------------------- 1 | DESCRIPTION: 2 | The dog command. 3 | 4 | USAGE: 5 | myapp dog [LEGS] [OPTIONS] 6 | 7 | ARGUMENTS: 8 | 9 | [LEGS] The number of legs. 10 | 11 | OPTIONS: 12 | -h, --help Prints help information. 13 | -a, --alive Indicates whether or not the animal is alive. 14 | -n, --name 15 | -g, --good-boy -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Help/Hidden_Command_Options.Output.verified.txt: -------------------------------------------------------------------------------- 1 | USAGE: 2 | myapp [OPTIONS] 3 | 4 | ARGUMENTS: 5 | Dummy argument FOO 6 | 7 | OPTIONS: 8 | -h, --help Prints help information 9 | --baz Dummy option BAZ -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Help/Hidden_Commands.Output.verified.txt: -------------------------------------------------------------------------------- 1 | USAGE: 2 | myapp [OPTIONS] 3 | 4 | OPTIONS: 5 | -h, --help Prints help information 6 | 7 | COMMANDS: 8 | dog The dog command 9 | horse The horse command -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Help/NoDescription.Output.verified.txt: -------------------------------------------------------------------------------- 1 | USAGE: 2 | myapp [OPTIONS] 3 | 4 | OPTIONS: 5 | -h, --help Prints help information 6 | 7 | COMMANDS: 8 | bar -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Help/NoVersion.Output.verified.txt: -------------------------------------------------------------------------------- 1 | USAGE: 2 | myapp [QUX] [OPTIONS] 3 | 4 | ARGUMENTS: 5 | 6 | 7 | 8 | 9 | [QUX] 10 | 11 | OPTIONS: 12 | -h, --help Prints help information -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Help/Required_Options.Output.verified.txt: -------------------------------------------------------------------------------- 1 | USAGE: 2 | myapp [OPTIONS] 3 | 4 | OPTIONS: 5 | -h, --help Prints help information 6 | --foo Foos the bars. Required -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Help/Required_Options_No_Description.Output.verified.txt: -------------------------------------------------------------------------------- 1 | USAGE: 2 | myapp [OPTIONS] 3 | 4 | OPTIONS: 5 | -h, --help Prints help information 6 | --foo Required -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Help/Root.Output.verified.txt: -------------------------------------------------------------------------------- 1 | USAGE: 2 | myapp [OPTIONS] 3 | 4 | OPTIONS: 5 | -h, --help Prints help information 6 | 7 | COMMANDS: 8 | dog The dog command 9 | horse The horse command 10 | giraffe The giraffe command -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Help/Root.QuestionMark.verified.txt: -------------------------------------------------------------------------------- 1 | USAGE: 2 | myapp [OPTIONS] 3 | 4 | OPTIONS: 5 | -h, --help Prints help information 6 | 7 | COMMANDS: 8 | dog The dog command 9 | horse The horse command 10 | giraffe The giraffe command -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Help/Root_Command.Output.verified.txt: -------------------------------------------------------------------------------- 1 | DESCRIPTION: 2 | The horse command 3 | 4 | USAGE: 5 | myapp horse [LEGS] [OPTIONS] 6 | 7 | ARGUMENTS: 8 | [LEGS] The number of legs 9 | 10 | OPTIONS: 11 | DEFAULT 12 | -h, --help Prints help information 13 | -a, --alive Indicates whether or not the animal is alive 14 | -n, --name 15 | -d, --day 16 | --file food.txt 17 | --directory -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Help/Root_Command.QuestionMark.verified.txt: -------------------------------------------------------------------------------- 1 | DESCRIPTION: 2 | The horse command 3 | 4 | USAGE: 5 | myapp horse [LEGS] [OPTIONS] 6 | 7 | ARGUMENTS: 8 | [LEGS] The number of legs 9 | 10 | OPTIONS: 11 | DEFAULT 12 | -h, --help Prints help information 13 | -a, --alive Indicates whether or not the animal is alive 14 | -n, --name 15 | -d, --day 16 | --file food.txt 17 | --directory -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Help/Root_Examples_Children.Output.verified.txt: -------------------------------------------------------------------------------- 1 | USAGE: 2 | myapp [OPTIONS] 3 | 4 | EXAMPLES: 5 | myapp dog --name Rufus --age 12 --good-boy 6 | myapp dog --name Luna 7 | myapp dog --name Charlie 8 | myapp dog --name Bella 9 | myapp dog --name Daisy 10 | 11 | OPTIONS: 12 | -h, --help Prints help information 13 | 14 | COMMANDS: 15 | dog The dog command 16 | horse The horse command -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Help/Root_Examples_Children_None.Output.verified.txt: -------------------------------------------------------------------------------- 1 | USAGE: 2 | myapp [OPTIONS] 3 | 4 | OPTIONS: 5 | -h, --help Prints help information 6 | 7 | COMMANDS: 8 | dog The dog command 9 | horse The horse command -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Help/Root_Examples_Leafs.Output.verified.txt: -------------------------------------------------------------------------------- 1 | USAGE: 2 | myapp [OPTIONS] 3 | 4 | EXAMPLES: 5 | myapp animal dog --name Rufus --age 12 --good-boy 6 | myapp animal dog --name Luna 7 | myapp animal dog --name Charlie 8 | myapp animal dog --name Bella 9 | myapp animal dog --name Daisy 10 | 11 | OPTIONS: 12 | -h, --help Prints help information 13 | 14 | COMMANDS: 15 | animal The animal command -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Help/Root_Examples_Leafs_None.Output.verified.txt: -------------------------------------------------------------------------------- 1 | USAGE: 2 | myapp [OPTIONS] 3 | 4 | OPTIONS: 5 | -h, --help Prints help information 6 | 7 | COMMANDS: 8 | animal The animal command -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Help/Version.Output.verified.txt: -------------------------------------------------------------------------------- 1 | USAGE: 2 | myapp [QUX] [OPTIONS] 3 | 4 | ARGUMENTS: 5 | 6 | 7 | 8 | 9 | [QUX] 10 | 11 | OPTIONS: 12 | -h, --help Prints help information 13 | -v, --version Prints version information -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Parsing/CannotAssignValueToFlag/Test_1.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Flags cannot be assigned a value. 2 | 3 | dog --alive=indeterminate foo 4 | ^^^^^^^ Can't assign value -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Parsing/CannotAssignValueToFlag/Test_2.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Flags cannot be assigned a value. 2 | 3 | dog -a=indeterminate foo 4 | ^^ Can't assign value -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Parsing/InvalidShortOptionName/Test_1.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Short option does not have a valid name. 2 | 3 | dog -f0o 4 | ^ Not a valid name for a short option -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Parsing/LongOptionNameContainSymbol/Test_1.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Invalid long option name. 2 | 3 | dog --f€oo 4 | ^ Invalid character -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Parsing/LongOptionNameIsMissing/Test_1.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Invalid long option name. 2 | 3 | dog -- 4 | ^^ Did you forget the option name? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Parsing/LongOptionNameIsOneCharacter/Test_1.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Invalid long option name. 2 | 3 | dog --f 4 | ^^^ Did you mean -f? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Parsing/LongOptionNameStartWithDigit/Test_1.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Invalid long option name. 2 | 3 | dog --1foo 4 | ^^^^^^ Option names cannot start with a digit -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Parsing/NoMatchingArgument/Test_1.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Could not match 'baz' with an argument. 2 | 3 | giraffe foo bar baz 4 | ^^^ Could not match to argument -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Parsing/NoValueForOption/Test_1.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Option 'name' is defined but no value has been provided. 2 | 3 | dog --name 4 | ^^^^^^ No value provided -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Parsing/NoValueForOption/Test_2.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Option 'name' is defined but no value has been provided. 2 | 3 | dog -n 4 | ^^ No value provided -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Parsing/OptionWithoutName/Test_1.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Option does not have a name. 2 | 3 | dog - 4 | ^ Did you forget the option name? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Parsing/OptionWithoutName/Test_2.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Expected an option value. 2 | 3 | dog --foo= 4 | ^ Did you forget the option value? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Parsing/OptionWithoutName/Test_3.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Expected an option value. 2 | 3 | dog --foo: 4 | ^ Did you forget the option value? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Parsing/OptionWithoutName/Test_4.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Expected an option value. 2 | 3 | dog -f= 4 | ^ Did you forget the option value? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Parsing/OptionWithoutName/Test_5.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Expected an option value. 2 | 3 | dog -f: 4 | ^ Did you forget the option value? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Parsing/UnexpectedOption/Test_1.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Unexpected option 'foo'. 2 | 3 | --foo 4 | ^^^^^ Did you forget the command? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Parsing/UnexpectedOption/Test_2.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Unexpected option 'f'. 2 | 3 | -f 4 | ^^ Did you forget the command? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Parsing/UnknownCommand/Test_1.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Unknown command 'cat'. 2 | 3 | cat 14 4 | ^^^ No such command -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Parsing/UnknownCommand/Test_2.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Unknown command 'other'. 2 | 3 | empty other 4 | ^^^^^ No such command -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Parsing/UnknownCommand/Test_3.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Unknown command 'bat'. 2 | 3 | dog bat 14 4 | ^^^ Did you mean 'cat'? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Parsing/UnknownCommand/Test_4.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Unknown command 'bat'. 2 | 3 | bat 14 4 | ^^^ Did you mean 'cat'? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Parsing/UnknownCommand/Test_5.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Unknown command 'bat'. 2 | 3 | bat 4 | ^^^ Did you mean 'cat'? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Parsing/UnknownCommand/Test_6.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Unknown command 'bat'. 2 | 3 | dog bat 4 | ^^^ Did you mean 'cat'? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Parsing/UnknownCommand/Test_7.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Unknown command 'bat'. 2 | 3 | qux bat 4 | ^^^ Did you mean 'bar'? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Parsing/UnknownCommand/Test_8.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Unknown command 'bat'. 2 | 3 | foo qux bat 4 | ^^^ Did you mean 'bar'? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Parsing/UnknownOption/Test_1.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Unknown option 'unknown'. 2 | 3 | dog --unknown 4 | ^^^^^^^^^ Unknown option -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Parsing/UnknownOption/Test_2.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Unknown option 'u'. 2 | 3 | dog -u 4 | ^^ Unknown option -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Expectations/Xml/Test_5.Output.verified.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Unit/DefaultTypeRegistrarTests.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Unit.Cli; 2 | 3 | public sealed class DefaultTypeRegistrarTests 4 | { 5 | [Fact] 6 | public void Should_Pass_Base_Registrar_Tests() 7 | { 8 | var harness = new TypeRegistrarBaseTests(() => new DefaultTypeRegistrar()); 9 | harness.RunAllTests(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Unit/Testing/FakeTypeRegistrarTests.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests.Unit.Cli.Testing; 2 | 3 | public class FakeTypeRegistrarTests 4 | { 5 | [Fact] 6 | public void TheFakeTypeRegistrarPassesAllTheTestsForARegistrar() 7 | { 8 | ITypeRegistrar Factory() => new FakeTypeRegistrar(); 9 | var tester = new TypeRegistrarBaseTests(Factory); 10 | tester.RunAllTests(); 11 | } 12 | } -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/Utilities/ModuleInitializerAttribute.cs: -------------------------------------------------------------------------------- 1 | #if !NET6_0_OR_GREATER 2 | namespace System.Runtime.CompilerServices; 3 | 4 | [AttributeUsage(AttributeTargets.Method, Inherited = false)] 5 | public sealed class ModuleInitializerAttribute : Attribute 6 | { 7 | } 8 | #endif -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Cli.Tests/VerifyConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests; 2 | 3 | public static class VerifyConfiguration 4 | { 5 | [ModuleInitializer] 6 | public static void Init() 7 | { 8 | Verifier.DerivePathInfo(Expectations.Initialize); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/AlternateScreen/Show.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Foo 2 | [?1049hBar 3 | [?1049l -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Arguments/ArgumentCannotContainOptions.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: An error occured when parsing template. 2 | Arguments can not contain options. 3 | 4 | --foo 5 | ^^^^^ Not permitted -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Arguments/InvalidCharacterInOptionName.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: An error occured when parsing template. 2 | Encountered invalid character '$' in option name. 3 | 4 | --f$oo 5 | ^ Invalid character -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Arguments/InvalidCharacterInValueName.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: An error occured when parsing template. 2 | Encountered invalid character '$' in value name. 3 | 4 | -f|--foo 5 | ^ Invalid character -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Arguments/LongOptionMustHaveMoreThanOneCharacter.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: An error occured when parsing template. 2 | Long option names must consist of more than one character. 3 | 4 | --f 5 | ^ Invalid option name -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Arguments/MissingLongAndShortName.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: An error occured when parsing template. 2 | No long or short name for option has been specified. 3 | 4 | 5 | ^^^^^ Missing option. Was this meant to be an argument? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Arguments/MultipleOptionValuesAreNotSupported.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: An error occured when parsing template. 2 | Multiple option values are not supported. 3 | 4 | -f|--foo 5 | ^^^^^ Too many option values -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Arguments/MultipleValuesAreNotSupported.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: An error occured when parsing template. 2 | Multiple values are not supported. 3 | 4 | 5 | ^^^^^ Too many values -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Arguments/OptionNamesCannotStartWithDigit.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: An error occured when parsing template. 2 | Option names cannot start with a digit. 3 | 4 | --1foo 5 | ^^^^ Invalid option name -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Arguments/OptionsMustHaveName.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: An error occured when parsing template. 2 | Options without name are not allowed. 3 | 4 | --foo|- 5 | ^ Missing option name -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Arguments/ShortOptionMustOnlyBeOneCharacter.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: An error occured when parsing template. 2 | Short option names can not be longer than one character. 3 | 4 | --foo|-bar 5 | ^^^ Invalid option name -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Arguments/UnexpectedCharacter.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: An error occured when parsing template. 2 | Encountered unexpected character '$'. 3 | 4 | $ 5 | ^ Unexpected character -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Arguments/UnterminatedValueName.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: An error occured when parsing template. 2 | Encountered unterminated value name 'BAR'. 3 | 4 | --foo|-f 5 | ^^ Missing value name -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Help/ArgumentOrder.Output.verified.txt: -------------------------------------------------------------------------------- 1 | USAGE: 2 | myapp [QUX] [OPTIONS] 3 | 4 | ARGUMENTS: 5 | 6 | 7 | 8 | 9 | [QUX] 10 | 11 | OPTIONS: 12 | -h, --help Prints help information -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Help/Command.Output.verified.txt: -------------------------------------------------------------------------------- 1 | USAGE: 2 | myapp cat [LEGS] [OPTIONS] 3 | 4 | ARGUMENTS: 5 | [LEGS] The number of legs 6 | 7 | OPTIONS: 8 | -h, --help Prints help information 9 | -a, --alive Indicates whether or not the animal is alive 10 | -n, --name 11 | --agility The agility between 0 and 100 12 | 13 | COMMANDS: 14 | lion The lion command -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Help/CommandExamples.Output.verified.txt: -------------------------------------------------------------------------------- 1 | USAGE: 2 | myapp animal [LEGS] [OPTIONS] 3 | 4 | EXAMPLES: 5 | myapp animal --help 6 | 7 | ARGUMENTS: 8 | [LEGS] The number of legs 9 | 10 | OPTIONS: 11 | -h, --help Prints help information 12 | -a, --alive Indicates whether or not the animal is alive 13 | 14 | COMMANDS: 15 | dog The dog command 16 | horse The horse command -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Help/Default.Output.verified.txt: -------------------------------------------------------------------------------- 1 | USAGE: 2 | myapp [LEGS] [OPTIONS] 3 | 4 | ARGUMENTS: 5 | The number of teeth the lion has 6 | [LEGS] The number of legs 7 | 8 | OPTIONS: 9 | -h, --help Prints help information 10 | -a, --alive Indicates whether or not the animal is alive 11 | -n, --name 12 | --agility The agility between 0 and 100 13 | -c The number of children the lion has -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Help/DefaultExamples.Output.verified.txt: -------------------------------------------------------------------------------- 1 | USAGE: 2 | myapp [LEGS] [OPTIONS] 3 | 4 | EXAMPLES: 5 | myapp 12 -c 3 6 | 7 | ARGUMENTS: 8 | The number of teeth the lion has 9 | [LEGS] The number of legs 10 | 11 | OPTIONS: 12 | -h, --help Prints help information 13 | -a, --alive Indicates whether or not the animal is alive 14 | -n, --name 15 | --agility The agility between 0 and 100 16 | -c The number of children the lion has -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Help/Hidden_Command_Options.Output.verified.txt: -------------------------------------------------------------------------------- 1 | USAGE: 2 | myapp [OPTIONS] 3 | 4 | ARGUMENTS: 5 | Dummy argument FOO 6 | 7 | OPTIONS: 8 | -h, --help Prints help information 9 | --baz Dummy option BAZ -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Help/Hidden_Commands.Output.verified.txt: -------------------------------------------------------------------------------- 1 | USAGE: 2 | myapp [OPTIONS] 3 | 4 | OPTIONS: 5 | -h, --help Prints help information 6 | -v, --version Prints version information 7 | 8 | COMMANDS: 9 | dog The dog command 10 | horse The horse command -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Help/Leaf.Output.verified.txt: -------------------------------------------------------------------------------- 1 | USAGE: 2 | myapp cat [LEGS] lion [OPTIONS] 3 | 4 | ARGUMENTS: 5 | The number of teeth the lion has 6 | 7 | OPTIONS: 8 | -h, --help Prints help information 9 | -c The number of children the lion has -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Help/NoDescription.Output.verified.txt: -------------------------------------------------------------------------------- 1 | USAGE: 2 | myapp [OPTIONS] 3 | 4 | OPTIONS: 5 | -h, --help Prints help information 6 | -v, --version Prints version information 7 | 8 | COMMANDS: 9 | bar -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Help/Root.Output.verified.txt: -------------------------------------------------------------------------------- 1 | USAGE: 2 | myapp [OPTIONS] 3 | 4 | OPTIONS: 5 | -h, --help Prints help information 6 | -v, --version Prints version information 7 | 8 | COMMANDS: 9 | dog The dog command 10 | horse The horse command 11 | giraffe The giraffe command -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Help/RootExamples.Output.verified.txt: -------------------------------------------------------------------------------- 1 | USAGE: 2 | myapp [OPTIONS] 3 | 4 | EXAMPLES: 5 | myapp dog --name Rufus --age 12 --good-boy 6 | myapp horse --name Brutus 7 | 8 | OPTIONS: 9 | -h, --help Prints help information 10 | -v, --version Prints version information 11 | 12 | COMMANDS: 13 | dog The dog command 14 | horse The horse command -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Help/RootExamples_Children.Output.verified.txt: -------------------------------------------------------------------------------- 1 | USAGE: 2 | myapp [OPTIONS] 3 | 4 | EXAMPLES: 5 | myapp dog --name Rufus --age 12 --good-boy 6 | myapp horse --name Brutus 7 | 8 | OPTIONS: 9 | -h, --help Prints help information 10 | -v, --version Prints version information 11 | 12 | COMMANDS: 13 | dog The dog command 14 | horse The horse command -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Help/RootExamples_Leafs.Output.verified.txt: -------------------------------------------------------------------------------- 1 | USAGE: 2 | myapp [OPTIONS] 3 | 4 | EXAMPLES: 5 | myapp animal dog --name Rufus --age 12 --good-boy 6 | myapp animal horse --name Brutus 7 | 8 | OPTIONS: 9 | -h, --help Prints help information 10 | -v, --version Prints version information 11 | 12 | COMMANDS: 13 | animal The animal command -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Parsing/CannotAssignValueToFlag/Test_1.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Flags cannot be assigned a value. 2 | 3 | dog --alive foo 4 | ^^^^^^^ Can't assign value -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Parsing/CannotAssignValueToFlag/Test_2.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Flags cannot be assigned a value. 2 | 3 | dog -a foo 4 | ^^ Can't assign value -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Parsing/InvalidShortOptionName/Test_1.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Short option does not have a valid name. 2 | 3 | dog -f0o 4 | ^ Not a valid name for a short option -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Parsing/LongOptionNameContainSymbol/Test_1.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Invalid long option name. 2 | 3 | dog --f€oo 4 | ^ Invalid character -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Parsing/LongOptionNameIsMissing/Test_1.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Invalid long option name. 2 | 3 | dog -- 4 | ^^ Did you forget the option name? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Parsing/LongOptionNameIsOneCharacter/Test_1.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Invalid long option name. 2 | 3 | dog --f 4 | ^^^ Did you mean -f? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Parsing/LongOptionNameStartWithDigit/Test_1.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Invalid long option name. 2 | 3 | dog --1foo 4 | ^^^^^^ Option names cannot start with a digit -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Parsing/NoMatchingArgument/Test_1.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Could not match 'baz' with an argument. 2 | 3 | giraffe foo bar baz 4 | ^^^ Could not match to argument -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Parsing/NoValueForOption/Test_1.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Option 'name' is defined but no value has been provided. 2 | 3 | dog --name 4 | ^^^^^^ No value provided -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Parsing/NoValueForOption/Test_2.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Option 'name' is defined but no value has been provided. 2 | 3 | dog -n 4 | ^^ No value provided -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Parsing/OptionWithoutName/Test_1.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Option does not have a name. 2 | 3 | dog - 4 | ^ Did you forget the option name? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Parsing/OptionWithoutName/Test_2.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Expected an option value. 2 | 3 | dog --foo= 4 | ^ Did you forget the option value? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Parsing/OptionWithoutName/Test_3.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Expected an option value. 2 | 3 | dog --foo: 4 | ^ Did you forget the option value? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Parsing/OptionWithoutName/Test_4.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Expected an option value. 2 | 3 | dog -f= 4 | ^ Did you forget the option value? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Parsing/OptionWithoutName/Test_5.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Expected an option value. 2 | 3 | dog -f: 4 | ^ Did you forget the option value? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Parsing/UnexpectedOption/Test_1.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Unexpected option 'foo'. 2 | 3 | --foo 4 | ^^^^^ Did you forget the command? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Parsing/UnexpectedOption/Test_2.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Unexpected option 'f'. 2 | 3 | -f 4 | ^^ Did you forget the command? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Parsing/UnknownCommand/Test_1.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Unknown command 'cat'. 2 | 3 | cat 14 4 | ^^^ No such command -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Parsing/UnknownCommand/Test_2.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Unknown command 'other'. 2 | 3 | empty other 4 | ^^^^^ No such command -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Parsing/UnknownCommand/Test_3.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Unknown command 'bat'. 2 | 3 | dog bat 14 4 | ^^^ Did you mean 'cat'? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Parsing/UnknownCommand/Test_4.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Unknown command 'bat'. 2 | 3 | bat 14 4 | ^^^ Did you mean 'cat'? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Parsing/UnknownCommand/Test_5.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Unknown command 'bat'. 2 | 3 | bat 4 | ^^^ Did you mean 'cat'? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Parsing/UnknownCommand/Test_6.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Unknown command 'bat'. 2 | 3 | dog bat 4 | ^^^ Did you mean 'cat'? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Parsing/UnknownCommand/Test_7.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Unknown command 'bat'. 2 | 3 | qux bat 4 | ^^^ Did you mean 'bar'? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Parsing/UnknownCommand/Test_8.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Unknown command 'bat'. 2 | 3 | foo qux bat 4 | ^^^ Did you mean 'bar'? -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Parsing/UnknownOption/Test_1.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Unknown option 'unknown'. 2 | 3 | dog --unknown 4 | ^^^^^^^^^ Unknown option -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Parsing/UnknownOption/Test_2.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Error: Unknown option 'u'. 2 | 3 | dog -u 4 | ^^ Unknown option -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Cli/Xml/Test_5.Output.verified.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Exception/Default.Output.verified.txt: -------------------------------------------------------------------------------- 1 | System.InvalidOperationException: Throwing! 2 | at bool Spectre.Console.Tests.Data.TestExceptions.MethodThatThrows(int? number) in /xyz/Exceptions.cs:nn 3 | at void Spectre.Console.Tests.Unit.ExceptionTests.<>c.b__0_0() in /xyz/ExceptionTests.cs:nn 4 | at Exception Spectre.Console.Tests.Unit.ExceptionTests.GetException(Action action) in /xyz/ExceptionTests.cs:nn 5 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Exception/NoStackTrace.Output.verified.txt: -------------------------------------------------------------------------------- 1 | System.InvalidOperationException: Something threw! 2 | System.InvalidOperationException: Throwing! 3 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Exception/OutParam.Output.verified.txt: -------------------------------------------------------------------------------- 1 | InvalidOperationException: Throwing! 2 | at List Spectre.Console.Tests.Data.TestExceptions.GenericMethodWithOutThatThrows(out List firstFewItems) in /xyz/Exceptions.cs:nn 3 | at void Spectre.Console.Tests.Unit.ExceptionTests.<>c.b__5_0() in /xyz/ExceptionTests.cs:nn 4 | at Exception Spectre.Console.Tests.Unit.ExceptionTests.GetException(Action action) in /xyz/ExceptionTests.cs:nn 5 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Exception/ShortenedMethods.Output.verified.txt: -------------------------------------------------------------------------------- 1 | System.InvalidOperationException: Throwing! 2 | at bool MethodThatThrows(int? number) in /xyz/Exceptions.cs:nn 3 | at void b__2_0() in /xyz/ExceptionTests.cs:nn 4 | at Exception GetException(Action action) in /xyz/ExceptionTests.cs:nn 5 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Exception/ShortenedTypes.Output.verified.txt: -------------------------------------------------------------------------------- 1 | InvalidOperationException: Throwing! 2 | at bool Spectre.Console.Tests.Data.TestExceptions.MethodThatThrows(int? number) in /xyz/Exceptions.cs:nn 3 | at void Spectre.Console.Tests.Unit.ExceptionTests.<>c.b__1_0() in /xyz/ExceptionTests.cs:nn 4 | at Exception Spectre.Console.Tests.Unit.ExceptionTests.GetException(Action action) in /xyz/ExceptionTests.cs:nn 5 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Live/Progress/Render_ReduceWidth.Output.verified.txt: -------------------------------------------------------------------------------- 1 | 2 | foo ━━ 0% --:--:-- ⣷ 3 | bar ━━ 0% --:--:-- ⣷ 4 | baz ━━ 0% --:--:-- ⣷ 5 | 6 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Live/Status/Render.Output.verified.txt: -------------------------------------------------------------------------------- 1 | [?25l 2 | * foo 3 | 4 |  5 | - bar 6 | 7 |  8 | * baz 9 | 10 | [?25h -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Prompts/Text/AcceptChoice.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Favorite fruit? [Banana/Orange] (Banana): Orange 2 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Prompts/Text/AutoComplete_BestMatch.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Favorite fruit? [Banana/Bandana/Orange]: Band    Bandana 2 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Prompts/Text/AutoComplete_Empty.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Favorite fruit? [Banana/Orange] (Banana): Banana 2 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Prompts/Text/AutoComplete_NextChoice.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Favorite fruit? [Apple/Banana/Orange]: Apple     Banana 2 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Prompts/Text/AutoComplete_PreviousChoice.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Favorite fruit? [Banana/Bandana/Orange]: Ban   Banana      Bandana       Banana 2 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Prompts/Text/ChoicesStyleNotSet.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Enter Value: [Choice 1/Choice 2]: Choice 2 2 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Prompts/Text/ChoicesStyleSet.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Enter Value: [Choice 1/Choice 2]: Choice 2 2 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Prompts/Text/ConversionError.Output.verified.txt: -------------------------------------------------------------------------------- 1 | [ 2 | Age? ninety-nine, 3 | Invalid input, 4 | Age? 99 5 | ] -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Prompts/Text/CustomConverter.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Favorite fruit? [Apple/Banana]: Banana 2 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Prompts/Text/CustomValidation.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Guess number: 22 2 | Too low 3 | Guess number: 102 4 | Too high 5 | Guess number: ABC 6 | Invalid input 7 | Guess number: 99 8 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Prompts/Text/DefaultValue.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Favorite fruit? [Banana/Orange] (Banana): Banana 2 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Prompts/Text/DefaultValueStyleNotSet.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Enter Value: (default): Input 2 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Prompts/Text/DefaultValueStyleSet.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Enter Value: (default): Input 2 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Prompts/Text/InvalidChoice.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Favorite fruit? [Banana/Orange] (Banana): Apple 2 | Please select one of the available options 3 | Favorite fruit? [Banana/Orange] (Banana): Banana 4 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Prompts/Text/NoSuffix.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Enter command$ Orange 2 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Prompts/Text/SecretDefaultValue.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Favorite fruit? (******): ****** 2 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Prompts/Text/SecretDefaultValueCustomMask.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Favorite fruit? (------): ------ 2 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Prompts/Text/SecretDefaultValueNullMask.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Favorite fruit? (): 2 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Prompts/Text/SecretValueBackspaceNullMask.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Favorite fruit? 2 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Rendering/Borders/Box/AsciiBorder.Output.verified.txt: -------------------------------------------------------------------------------- 1 | +-Greeting----+ 2 | | Hello World | 3 | +-------------+ 4 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Rendering/Borders/Box/DoubleBorder.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ╔═Greeting════╗ 2 | ║ Hello World ║ 3 | ╚═════════════╝ 4 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Rendering/Borders/Box/HeavyBorder.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┏━Greeting━━━━┓ 2 | ┃ Hello World ┃ 3 | ┗━━━━━━━━━━━━━┛ 4 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Rendering/Borders/Box/NoBorder.Output.verified.txt: -------------------------------------------------------------------------------- 1 |  Hello World 2 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Rendering/Borders/Box/NoBorder_With_Header.Output.verified.txt: -------------------------------------------------------------------------------- 1 |  Greeting 2 | Hello World 3 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Rendering/Borders/Box/RoundedBorder.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ╭─Greeting────╮ 2 | │ Hello World │ 3 | ╰─────────────╯ 4 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Rendering/Borders/Box/SquareBorder.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌─Greeting────┐ 2 | │ Hello World │ 3 | └─────────────┘ 4 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Rendering/Borders/Table/Ascii2Border.Output.verified.txt: -------------------------------------------------------------------------------- 1 | +----------+----------+ 2 | | Header 1 | Header 2 | 3 | |----------+----------| 4 | | Cell | Cell | 5 | | Cell | Cell | 6 | |----------+----------| 7 | | Footer 1 | Footer 2 | 8 | +----------+----------+ 9 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Rendering/Borders/Table/AsciiBorder.Output.verified.txt: -------------------------------------------------------------------------------- 1 | +---------------------+ 2 | | Header 1 | Header 2 | 3 | |----------+----------| 4 | | Cell | Cell | 5 | | Cell | Cell | 6 | |----------+----------| 7 | | Footer 1 | Footer 2 | 8 | +---------------------+ 9 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Rendering/Borders/Table/AsciiDoubleHeadBorder.Output.verified.txt: -------------------------------------------------------------------------------- 1 | +----------+----------+ 2 | | Header 1 | Header 2 | 3 | |==========+==========| 4 | | Cell | Cell | 5 | | Cell | Cell | 6 | +----------+----------+ 7 | | Footer 1 | Footer 2 | 8 | +----------+----------+ 9 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Rendering/Borders/Table/DoubleBorder.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ╔══════════╦══════════╗ 2 | ║ Header 1 ║ Header 2 ║ 3 | ╠══════════╬══════════╣ 4 | ║ Cell ║ Cell ║ 5 | ║ Cell ║ Cell ║ 6 | ╠══════════╬══════════╣ 7 | ║ Footer 1 ║ Footer 2 ║ 8 | ╚══════════╩══════════╝ 9 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Rendering/Borders/Table/DoubleEdgeBorder.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ╔══════════╤══════════╗ 2 | ║ Header 1 │ Header 2 ║ 3 | ╟──────────┼──────────╢ 4 | ║ Cell │ Cell ║ 5 | ║ Cell │ Cell ║ 6 | ╟──────────┼──────────╢ 7 | ║ Footer 1 │ Footer 2 ║ 8 | ╚══════════╧══════════╝ 9 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Rendering/Borders/Table/HeavyBorder.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┏━━━━━━━━━━┳━━━━━━━━━━┓ 2 | ┃ Header 1 ┃ Header 2 ┃ 3 | ┣━━━━━━━━━━╋━━━━━━━━━━┫ 4 | ┃ Cell ┃ Cell ┃ 5 | ┃ Cell ┃ Cell ┃ 6 | ┣━━━━━━━━━━╋━━━━━━━━━━┫ 7 | ┃ Footer 1 ┃ Footer 2 ┃ 8 | ┗━━━━━━━━━━┻━━━━━━━━━━┛ 9 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Rendering/Borders/Table/HeavyEdgeBorder.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┏━━━━━━━━━━┯━━━━━━━━━━┓ 2 | ┃ Header 1 │ Header 2 ┃ 3 | ┠──────────┼──────────┨ 4 | ┃ Cell │ Cell ┃ 5 | ┃ Cell │ Cell ┃ 6 | ┠──────────┼──────────┨ 7 | ┃ Footer 1 │ Footer 2 ┃ 8 | ┗━━━━━━━━━━┷━━━━━━━━━━┛ 9 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Rendering/Borders/Table/HeavyHeadBorder.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┏━━━━━━━━━━┳━━━━━━━━━━┓ 2 | ┃ Header 1 ┃ Header 2 ┃ 3 | ┡━━━━━━━━━━╇━━━━━━━━━━┩ 4 | │ Cell │ Cell │ 5 | │ Cell │ Cell │ 6 | ├──────────┼──────────┤ 7 | │ Footer 1 │ Footer 2 │ 8 | └──────────┴──────────┘ 9 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Rendering/Borders/Table/HorizontalBorder.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ─────────────────────── 2 | Header 1 Header 2 3 | ─────────────────────── 4 | Cell Cell 5 | Cell Cell 6 | ─────────────────────── 7 | Footer 1 Footer 2 8 | ─────────────────────── 9 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Rendering/Borders/Table/MarkdownBorder.Output.verified.txt: -------------------------------------------------------------------------------- 1 | 2 | | Header 1 | Header 2 | 3 | | -------- | -------- | 4 | | Cell | Cell | 5 | | Cell | Cell | 6 | | Footer 1 | Footer 2 | 7 | 8 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Rendering/Borders/Table/MarkdownBorder_Centered.Output.verified.txt: -------------------------------------------------------------------------------- 1 | 2 | | Header 1 | Header 2 | 3 | | -------- | :------: | 4 | | Cell | Cell | 5 | | Cell | Cell | 6 | | Footer 1 | Footer 2 | 7 | 8 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Rendering/Borders/Table/MarkdownBorder_LeftAligned.Output.verified.txt: -------------------------------------------------------------------------------- 1 | 2 | | Header 1 | Header 2 | 3 | | -------- | :------- | 4 | | Cell | Cell | 5 | | Cell | Cell | 6 | | Footer 1 | Footer 2 | 7 | 8 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Rendering/Borders/Table/MarkdownBorder_RightAligned.Output.verified.txt: -------------------------------------------------------------------------------- 1 | 2 | | Header 1 | Header 2 | 3 | | -------- | -------: | 4 | | Cell | Cell | 5 | | Cell | Cell | 6 | | Footer 1 | Footer 2 | 7 | 8 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Rendering/Borders/Table/MinimalBorder.Output.verified.txt: -------------------------------------------------------------------------------- 1 | 2 | Header 1 │ Header 2 3 | ──────────┼────────── 4 | Cell │ Cell 5 | Cell │ Cell 6 | ──────────┼────────── 7 | Footer 1 │ Footer 2 8 | 9 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Rendering/Borders/Table/MinimalDoubleHeadBorder.Output.verified.txt: -------------------------------------------------------------------------------- 1 | 2 | Header 1 │ Header 2 3 | ══════════╪══════════ 4 | Cell │ Cell 5 | Cell │ Cell 6 | ══════════╪══════════ 7 | Footer 1 │ Footer 2 8 | 9 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Rendering/Borders/Table/MinimalHeavyHeadBorder.Output.verified.txt: -------------------------------------------------------------------------------- 1 | 2 | Header 1 │ Header 2 3 | ━━━━━━━━━━┿━━━━━━━━━━ 4 | Cell │ Cell 5 | Cell │ Cell 6 | ━━━━━━━━━━┿━━━━━━━━━━ 7 | Footer 1 │ Footer 2 8 | 9 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Rendering/Borders/Table/NoBorder.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Header 1 Header 2 2 | Cell Cell 3 | Cell Cell 4 | Footer 1 Footer 2 5 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Rendering/Borders/Table/RoundedBorder.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ╭──────────┬──────────╮ 2 | │ Header 1 │ Header 2 │ 3 | ├──────────┼──────────┤ 4 | │ Cell │ Cell │ 5 | │ Cell │ Cell │ 6 | ├──────────┼──────────┤ 7 | │ Footer 1 │ Footer 2 │ 8 | ╰──────────┴──────────╯ 9 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Rendering/Borders/Table/SimpleBorder.Output.verified.txt: -------------------------------------------------------------------------------- 1 | 2 | Header 1 Header 2 3 | ─────────────────────── 4 | Cell Cell 5 | Cell Cell 6 | ─────────────────────── 7 | Footer 1 Footer 2 8 | 9 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Rendering/Borders/Table/SimpleHeavyBorder.Output.verified.txt: -------------------------------------------------------------------------------- 1 | 2 | Header 1 Header 2 3 | ━━━━━━━━━━━━━━━━━━━━━━━ 4 | Cell Cell 5 | Cell Cell 6 | ━━━━━━━━━━━━━━━━━━━━━━━ 7 | Footer 1 Footer 2 8 | 9 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Rendering/Borders/Table/SquareBorder.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌──────────┬──────────┐ 2 | │ Header 1 │ Header 2 │ 3 | ├──────────┼──────────┤ 4 | │ Cell │ Cell │ 5 | │ Cell │ Cell │ 6 | ├──────────┼──────────┤ 7 | │ Footer 1 │ Footer 2 │ 8 | └──────────┴──────────┘ 9 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/TableRowCollectionTests.TheUpdateMethod.Should_Update_Row.verified.txt: -------------------------------------------------------------------------------- 1 | ┌───────────┬───────────┬───────────┐ 2 | │ Column #1 │ Column #2 │ Column #3 │ 3 | ├───────────┼───────────┼───────────┤ 4 | │ 1 │ │ │ 5 | │ 2 │ │ │ 6 | │ 3 │ 4 │ 5 │ 7 | └───────────┴───────────┴───────────┘ 8 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/TableRowCollectionTests.TheUpdateMethod.Should_Update_Row_With_Renderable.verified.txt: -------------------------------------------------------------------------------- 1 | ┌───────────┬───────────┬───────────┐ 2 | │ Column #1 │ Column #2 │ Column #3 │ 3 | ├───────────┼───────────┼───────────┤ 4 | │ 1 │ │ │ 5 | │ 2 │ │ │ 6 | │ 3 │ 4 │ 5 │ 7 | └───────────┴───────────┴───────────┘ 8 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/TableRowCollectionTests.TheUpdateMethod.Should_Update_Row_With_String.verified.txt: -------------------------------------------------------------------------------- 1 | ┌───────────┬───────────┬───────────┐ 2 | │ Column #1 │ Column #2 │ Column #3 │ 3 | ├───────────┼───────────┼───────────┤ 4 | │ 1 │ │ │ 5 | │ 2 │ │ │ 6 | │ 3 │ 4 │ 5 │ 7 | └───────────┴───────────┴───────────┘ 8 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/BarChart/Fixed_Max_Value.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Number of fruits 2 | Apple ███ 12 3 | Orange █████████████████████████ 54 4 | Banana ██████████████ 33 5 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/BarChart/Render.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Number of fruits 2 | Apple ████████ 12 3 | Orange █████████████████████████████████████████████████ 54 4 | Banana ████████████████████████████ 33 5 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/BarChart/Zero_Value.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Number of fruits 2 | Apple 0 3 | Orange █████████████████████████████████████████████████ 54 4 | Banana ████████████████████████████ 33 5 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/BreakdownChart/Ansi.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ████████████████████████████████████████████████████████████ 2 | 3 | ■ SCSS 37 ■ HTML 28.3 ■ C# 22.6 ■ JavaScript 6 4 | ■ Ruby 6 ■ Shell 0.1 5 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/BreakdownChart/Culture.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ████████████████████████████████████████████████████████████ 2 | ■ SCSS 37 ■ HTML 28,3 ■ C# 22,6 ■ JavaScript 6 3 | ■ Ruby 6 ■ Shell 0,1 4 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/BreakdownChart/Default.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ████████████████████████████████████████████████████████████████████████████████ 2 | ■ SCSS 37 ■ HTML 28.3 ■ C# 22.6 ■ JavaScript 6 ■ Ruby 6 ■ Shell 0.1 3 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/BreakdownChart/FullSize.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ████████████████████████████████████████████████████████████ 2 | 3 | ■ SCSS 37 ■ HTML 28.3 ■ C# 22.6 ■ JavaScript 6 4 | ■ Ruby 6 ■ Shell 0.1 5 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/BreakdownChart/HideTagValues.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ████████████████████████████████████████████████████████████ 2 | ■ SCSS ■ HTML ■ C# ■ JavaScript ■ Ruby ■ Shell 3 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/BreakdownChart/HideTags.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ████████████████████████████████████████████████████████████ 2 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/BreakdownChart/TagFormat.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ████████████████████████████████████████████████████████████ 2 | ■ SCSS 37% ■ HTML 28,3% ■ C# 22,6% ■ JavaScript 6% 3 | ■ Ruby 6% ■ Shell 0,1% 4 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/BreakdownChart/ValueColor.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ████████████████████████████████████████████████████████████ 2 | ■ SCSS 37 ■ HTML 28.3 ■ C# 22.6 ■ JavaScript 6 3 | ■ Ruby 6 ■ Shell 0.1 4 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/BreakdownChart/Width.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ████████████████████████████████████████████████████████████ 2 | ■ SCSS 37 ■ HTML 28.3 ■ C# 22.6 ■ JavaScript 6 3 | ■ Ruby 6 ■ Shell 0.1 4 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Calendar/Culture.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Oktober 2020 2 | ┌─────┬────┬────┬────┬────┬────┬────┐ 3 | │ Mo │ Di │ Mi │ Do │ Fr │ Sa │ So │ 4 | ├─────┼────┼────┼────┼────┼────┼────┤ 5 | │ │ │ │ 1 │ 2 │ 3* │ 4 │ 6 | │ 5 │ 6 │ 7 │ 8 │ 9 │ 10 │ 11 │ 7 | │ 12* │ 13 │ 14 │ 15 │ 16 │ 17 │ 18 │ 8 | │ 19 │ 20 │ 21 │ 22 │ 23 │ 24 │ 25 │ 9 | │ 26 │ 27 │ 28 │ 29 │ 30 │ 31 │ │ 10 | │ │ │ │ │ │ │ │ 11 | └─────┴────┴────┴────┴────┴────┴────┘ 12 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Canvas/Render.Output.verified.txt: -------------------------------------------------------------------------------- 1 |     2 | 3 | 4 | 5 |     6 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Canvas/Render_MaxWidth.Output.verified.txt: -------------------------------------------------------------------------------- 1 |   2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Canvas/Render_NarrowTerminal.Output.verified.txt: -------------------------------------------------------------------------------- 1 |   2 | 3 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Canvas/Render_Nested.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌──────┐ 2 | │   │ 3 | │   │ 4 | └──────┘ 5 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Columns/Render.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ╭────────────────────╮ ╭────────────────╮ ╭─────────────────╮ 2 | │ Savannah Thompson │ │ Sophie Ramos │ │ Katrin Goldberg │ 3 | │ Australia │ │ United States │ │ Germany │ 4 | ╰────────────────────╯ ╰────────────────╯ ╰─────────────────╯ 5 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Grid/AddEmptyRow/Render.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Foo Bar 2 | 3 | Qux Corgi 4 | 5 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Grid/Render.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Qux Corgi Waldo 2 | Grault Garply Fred 3 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Grid/Render_2.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Options 2 | -h, --help Show command line help. 3 | -c, --configuration The configuration to run for. 4 | The default for most projects is Debug. 5 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Grid/Render_Alignment.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Foo Bar Baz 2 | Qux Corgi Waldo 3 | Grault Garply Fred 4 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Grid/Render_ExplicitPadding.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Foo Bar Baz 2 | Qux Corgi Waldo 3 | GraultGarplyFred 4 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Grid/Render_Padding.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Foo Bar Baz 2 | Qux Corgi Waldo 3 | Grault Garply Fred 4 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Padder/Render.Output.verified.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | ┌───────┬───────┐ 4 | │ Foo │ Bar │ 5 | ├───────┼───────┤ 6 | │ Baz │ Qux │ 7 | │ Corgi │ Waldo │ 8 | └───────┴───────┘ 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Panel/Render.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌─────────────┐ 2 | │ Hello World │ 3 | └─────────────┘ 4 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Panel/Render_CJK.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌──────────┐ 2 | │ ┌──────┐ │ 3 | │ │ 测试 │ │ 4 | │ ├──────┤ │ 5 | │ │ 测试 │ │ 6 | │ └──────┘ │ 7 | └──────────┘ 8 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Panel/Render_Child_Centered.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌───────────────────────┐ 2 | │ Hello World │ 3 | └───────────────────────┘ 4 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Panel/Render_Child_Panel.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌─────────────────┐ 2 | │ ┌─────────────┐ │ 3 | │ │ Hello World │ │ 4 | │ └─────────────┘ │ 5 | └─────────────────┘ 6 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Panel/Render_Child_RightAligned.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌───────────────────────┐ 2 | │ Hello World │ 3 | └───────────────────────┘ 4 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Panel/Render_Expand.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌──────────────────────────────────────────────────────────────────────────────┐ 2 | │ Hello World │ 3 | └──────────────────────────────────────────────────────────────────────────────┘ 4 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Panel/Render_Header.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌─Greeting─────────────────────────────────────────────────────────────────────┐ 2 | │ Hello World │ 3 | └──────────────────────────────────────────────────────────────────────────────┘ 4 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Panel/Render_Header_Centered.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌───────────────────────────────────Greeting───────────────────────────────────┐ 2 | │ Hello World │ 3 | └──────────────────────────────────────────────────────────────────────────────┘ 4 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Panel/Render_Header_Collapse.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌─Greet…─┐ 2 | │ Hello │ 3 | │ World │ 4 | └────────┘ 5 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Panel/Render_Header_LeftAligned.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌─Greeting─────────────────────────────────────────────────────────────────────┐ 2 | │ Hello World │ 3 | └──────────────────────────────────────────────────────────────────────────────┘ 4 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Panel/Render_Header_RightAligned.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌─────────────────────────────────────────────────────────────────────Greeting─┐ 2 | │ Hello World │ 3 | └──────────────────────────────────────────────────────────────────────────────┘ 4 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Panel/Render_LineEndings.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌───────────────────────┐ 2 | │ I heard you like 📦 │ 3 | │ │ 4 | │ │ 5 | │ │ 6 | │ So I put a 📦 in a 📦 │ 7 | └───────────────────────┘ 8 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Panel/Render_Multiline.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌─────────────┐ 2 | │ Hello World │ 3 | │ Foo Bar │ 4 | └─────────────┘ 5 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Panel/Render_Padding.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌───────────────────┐ 2 | │ │ 3 | │ Hello World │ 4 | │ │ 5 | │ │ 6 | └───────────────────┘ 7 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Panel/Render_Unicode.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌────┐ 2 | │ │ 3 | │ 💩 │ 4 | │ │ 5 | └────┘ 6 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Panel/Render_Width.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌───────────────────────┐ 2 | │ Hello World │ 3 | └───────────────────────┘ 4 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Panel/Render_Width_MaxWidth.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌──────────────────┐ 2 | │ Hello World │ 3 | └──────────────────┘ 4 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Panel/Render_Wrap.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ╭─Short paths──────────────────────────────────────────────────────────────────────╮ 2 | │ at System.Runtime.CompilerServices.TaskAwaiter. │ 3 | │ HandleNonSuccessAndDebuggerNotification(Task task) │ 4 | ╰──────────────────────────────────────────────────────────────────────────────────╯ 5 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Panel/Render_ZeroPadding.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌───────────┐ 2 | │Hello World│ 3 | └───────────┘ 4 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/ProgressBar/Formatted.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9,000 2 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/ProgressBar/Render.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9000 -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Recorder/Text.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌─────────────────┬───────┬─────┐ 2 | │ Foo │ Bar │ Qux │ 3 | ├─────────────────┼───────┼─────┤ 4 | │ Corgi │ Waldo │ Zap │ 5 | │ ╭─────────────╮ │ │ │ 6 | │ │ Hello World │ │ │ │ 7 | │ ╰─────────────╯ │ │ │ 8 | └─────────────────┴───────┴─────┘ -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Rows/GH-1188-Rows.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌─────┐ 2 | │ 1 │ 3 | │ 22 │ 4 | │ 333 │ 5 | └─────┘ 6 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Rows/Render.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Hello 2 | ┌─────┬─────┐ 3 | │ Foo │ Bar │ 4 | ├─────┼─────┤ 5 | │ Baz │ Qux │ 6 | └─────┴─────┘ 7 | World 8 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Rows/Render_Empty.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌─────────────┬─────┐ 2 | │ Foo │ Bar │ 3 | ├─────────────┼─────┤ 4 | │ HELLO WORLD │ │ 5 | │ │ Qux │ 6 | └─────────────┴─────┘ 7 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Rows/Render_Expanded_And_Nested.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌────────────────────────────────────────────────────┬─────┐ 2 | │ Foo │ Bar │ 3 | ├────────────────────────────────────────────────────┼─────┤ 4 | │ HELLO WORLD │ │ 5 | │ Hello │ Qux │ 6 | │ World │ │ 7 | └────────────────────────────────────────────────────┴─────┘ 8 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Rows/Render_Nested.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌─────────────┬─────┐ 2 | │ Foo │ Bar │ 3 | ├─────────────┼─────┤ 4 | │ HELLO WORLD │ │ 5 | │ Hello │ Qux │ 6 | │ World │ │ 7 | └─────────────┴─────┘ 8 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Rule/Render.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ──────────────────────────────────────── 2 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Rule/Render_Border_Header.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ═════════════ Hello World ══════════════ 2 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Rule/Render_Border_NoHeader.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ════════════════════════════════════════ 2 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Rule/Render_Header_DefaultAlignment.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ───────────── Hello World ────────────── 2 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Rule/Render_Header_LeftAligned.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ── Hello World ───────────────────────── 2 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Rule/Render_Header_RightAligned.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ───────────────────────── Hello World ── 2 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Rule/Render_Linebreaks.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ──────────── Hello World ! ───────────── 2 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Rule/Render_Truncate.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ───────────── Hello World ────────────── 2 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/AddEmptyRow.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌────────┬────────┬───────┐ 2 | │ Foo │ Bar │ Baz │ 3 | ├────────┼────────┼───────┤ 4 | │ Qux │ Corgi │ Waldo │ 5 | │ │ │ │ 6 | │ Grault │ Garply │ Fred │ 7 | └────────┴────────┴───────┘ 8 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Render.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌────────┬────────┬───────┐ 2 | │ Foo │ Bar │ Baz │ 3 | ├────────┼────────┼───────┤ 4 | │ Qux │ Corgi │ Waldo │ 5 | │ Grault │ Garply │ Fred │ 6 | └────────┴────────┴───────┘ 7 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Render_CellPadding.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌────────┬────────┬──────────┐ 2 | │ Foo │ Bar │ Baz │ 3 | ├────────┼────────┼──────────┤ 4 | │ Qux │ Corgi │ Waldo │ 5 | │ Quuux │ │ │ 6 | │ Grault │ Garply │ Fred │ 7 | └────────┴────────┴──────────┘ 8 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Render_Centered.Align_Widget.verified.txt: -------------------------------------------------------------------------------- 1 |  ┌────────┬────────┬───────┐ 2 | │ Foo │ Bar │ Baz │ 3 | ├────────┼────────┼───────┤ 4 | │ Qux │ Corgi │ Waldo │ 5 | │ Grault │ Garply │ Fred │ 6 | └────────┴────────┴───────┘ -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Render_Centered.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌────────┬────────┬───────┐ 2 | │ Foo │ Bar │ Baz │ 3 | ├────────┼────────┼───────┤ 4 | │ Qux │ Corgi │ Waldo │ 5 | │ Grault │ Garply │ Fred │ 6 | └────────┴────────┴───────┘ 7 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Render_ColumnJustification.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌────────┬────────┬────────────────────────────┐ 2 | │ Foo │ Bar │ Baz │ 3 | ├────────┼────────┼────────────────────────────┤ 4 | │ Qux │ Corgi │ Waldo │ 5 | │ Grault │ Garply │ Lorem ipsum dolor sit amet │ 6 | └────────┴────────┴────────────────────────────┘ 7 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Render_EA_Character.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌───────────────┬───────────────┬──────────────┐ 2 | │ Foo │ Bar │ Baz │ 3 | ├───────────────┼───────────────┼──────────────┤ 4 | │ 中文 │ 日本語 │ 한국어 │ 5 | │ 这是中文测试 │ これは日本語 │ 이것은한국어 │ 6 | │ 字符串 │ のテスト文字 │ 테스트문자열 │ 7 | │ │ 列です │ 입니다 │ 8 | └───────────────┴───────────────┴──────────────┘ 9 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Render_Empty_Column.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌──┬───┐ 2 | │ │ │ 3 | ├──┼───┤ 4 | │ │ A │ 5 | │ │ B │ 6 | └──┴───┘ 7 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Render_Expand.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌───────────────────────────┬───────────────────────────┬──────────────────────┐ 2 | │ Foo │ Bar │ Baz │ 3 | ├───────────────────────────┼───────────────────────────┼──────────────────────┤ 4 | │ Qux │ Corgi │ Waldo │ 5 | │ Grault │ Garply │ Fred │ 6 | └───────────────────────────┴───────────────────────────┴──────────────────────┘ 7 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Render_Footers.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌────────┬────────┬───────┐ 2 | │ Foo │ Bar │ Baz │ 3 | ├────────┼────────┼───────┤ 4 | │ Qux │ Corgi │ Waldo │ 5 | │ Grault │ Garply │ Fred │ 6 | ├────────┼────────┼───────┤ 7 | │ Oof │ │ Zab │ 8 | └────────┴────────┴───────┘ 9 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Render_Impossible.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ╭───────┬───────┬───────╮ 2 | │ ┌───┐ │ ┌───┐ │ ┌───┐ │ 3 | │ │ A │ │ │ D │ │ │ G │ │ 4 | │ │ B │ │ │ E │ │ │ H │ │ 5 | │ │ C │ │ │ F │ │ │ I │ │ 6 | │ └───┘ │ └───┘ │ └───┘ │ 7 | ├───────┼───────┼───────┤ 8 | │ Hello │ World │ │ 9 | │ … │ Whaat │ Lol │ 10 | │ Hej │ Värld │ │ 11 | │ │ en │ │ 12 | ╰───────┴───────┴───────╯ 13 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Render_LeftAligned.Align_Widget.verified.txt: -------------------------------------------------------------------------------- 1 | ┌────────┬────────┬───────┐ 2 | │ Foo │ Bar │ Baz │ 3 | ├────────┼────────┼───────┤ 4 | │ Qux │ Corgi │ Waldo │ 5 | │ Grault │ Garply │ Fred │ 6 | └────────┴────────┴───────┘ -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Render_LeftAligned.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌────────┬────────┬───────┐ 2 | │ Foo │ Bar │ Baz │ 3 | ├────────┼────────┼───────┤ 4 | │ Qux │ Corgi │ Waldo │ 5 | │ Grault │ Garply │ Fred │ 6 | └────────┴────────┴───────┘ 7 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Render_Multiline.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌────────┬────────┬───────┐ 2 | │ Foo │ Bar │ Baz │ 3 | ├────────┼────────┼───────┤ 4 | │ Qux │ Corgi │ Waldo │ 5 | │ Quuux │ │ │ 6 | │ Grault │ Garply │ Fred │ 7 | └────────┴────────┴───────┘ 8 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Render_Nested.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌───────────────────────────────────┐ 2 | │ +-------------------------------+ │ 3 | │ | ╭──────────┬────────┬───────╮ | │ 4 | │ | │ Foo │ Bar │ Baz │ | │ 5 | │ | ├──────────┼────────┼───────┤ | │ 6 | │ | │ Qux │ Corgi │ Waldo │ | │ 7 | │ | │ Quuuuuux │ │ │ | │ 8 | │ | │ Grault │ Garply │ Fred │ | │ 9 | │ | ╰──────────┴────────┴───────╯ | │ 10 | │ +-------------------------------+ │ 11 | └───────────────────────────────────┘ 12 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Render_NoRows.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌─────┬─────┬────────┐ 2 | │ Foo │ Bar │ Baz │ 3 | └─────┴─────┴────────┘ 4 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Render_RightAligned.Align_Widget.verified.txt: -------------------------------------------------------------------------------- 1 |  ┌────────┬────────┬───────┐ 2 | │ Foo │ Bar │ Baz │ 3 | ├────────┼────────┼───────┤ 4 | │ Qux │ Corgi │ Waldo │ 5 | │ Grault │ Garply │ Fred │ 6 | └────────┴────────┴───────┘ -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Render_RightAligned.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌────────┬────────┬───────┐ 2 | │ Foo │ Bar │ Baz │ 3 | ├────────┼────────┼───────┤ 4 | │ Qux │ Corgi │ Waldo │ 5 | │ Grault │ Garply │ Fred │ 6 | └────────┴────────┴───────┘ 7 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Render_Row_Separators.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌────────┬────────┬───────┐ 2 | │ Foo │ Bar │ Baz │ 3 | ├────────┼────────┼───────┤ 4 | │ Qux │ Corgi │ Waldo │ 5 | ├────────┼────────┼───────┤ 6 | │ Grault │ Garply │ Fred │ 7 | └────────┴────────┴───────┘ 8 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Render_Row_Separators_No_Header.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌────────┬────────┐ 2 | │ Qux │ Corgi │ 3 | ├────────┼────────┤ 4 | │ Waldo │ Grault │ 5 | ├────────┼────────┤ 6 | │ Garply │ Fred │ 7 | └────────┴────────┘ 8 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Render_Title_Caption.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Hello World 2 | ╭────────┬────────┬───────╮ 3 | │ Foo │ Bar │ Baz │ 4 | ├────────┼────────┼───────┤ 5 | │ Qux │ Corgi │ Waldo │ 6 | │ Grault │ Garply │ Fred │ 7 | ╰────────┴────────┴───────╯ 8 | Goodbye World 9 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Render_Title_Caption_LeftAligned.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Hello World 2 | ╭────────┬────────┬───────╮ 3 | │ Foo │ Bar │ Baz │ 4 | ├────────┼────────┼───────┤ 5 | │ Qux │ Corgi │ Waldo │ 6 | │ Grault │ Garply │ Fred │ 7 | ╰────────┴────────┴───────╯ 8 | Goodbye World 9 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Render_Title_Caption_LowerCase.Output.verified.txt: -------------------------------------------------------------------------------- 1 | hello world 2 | ╭────────┬────────┬───────╮ 3 | │ Foo │ Bar │ Baz │ 4 | ├────────┼────────┼───────┤ 5 | │ Qux │ Corgi │ Waldo │ 6 | │ Grault │ Garply │ Fred │ 7 | ╰────────┴────────┴───────╯ 8 | goodbye world 9 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Rows/Add.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌───────────┐ 2 | │ Column #1 │ 3 | ├───────────┤ 4 | │ 1 │ 5 | │ 2 │ 6 | │ 3 │ 7 | └───────────┘ 8 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Rows/Extensions/Add.Renderables.verified.txt: -------------------------------------------------------------------------------- 1 | ┌───────────┬───────────┐ 2 | │ Column #1 │ Column #2 │ 3 | ├───────────┼───────────┤ 4 | │ 1 │ 1-2 │ 5 | │ 2 │ 2-2 │ 6 | │ 3 │ 3-2 │ 7 | └───────────┴───────────┘ 8 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Rows/Extensions/Add.Strings.verified.txt: -------------------------------------------------------------------------------- 1 | ┌───────────┬───────────┐ 2 | │ Column #1 │ Column #2 │ 3 | ├───────────┼───────────┤ 4 | │ 1 │ 1-2 │ 5 | │ 2 │ 2-2 │ 6 | │ 3 │ 3-2 │ 7 | └───────────┴───────────┘ 8 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Rows/Extensions/Insert.Renderables.verified.txt: -------------------------------------------------------------------------------- 1 | ┌───────────┬───────────┐ 2 | │ Column #1 │ Column #2 │ 3 | ├───────────┼───────────┤ 4 | │ 1 │ 1-2 │ 5 | │ 3 │ 3-2 │ 6 | │ 2 │ 2-2 │ 7 | └───────────┴───────────┘ 8 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Rows/Extensions/Insert.Strings.verified.txt: -------------------------------------------------------------------------------- 1 | ┌───────────┬───────────┐ 2 | │ Column #1 │ Column #2 │ 3 | ├───────────┼───────────┤ 4 | │ 1 │ 1-2 │ 5 | │ 3 │ 3-2 │ 6 | │ 2 │ 2-2 │ 7 | └───────────┴───────────┘ 8 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Rows/Extensions/Remove.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌───────────┬───────────┐ 2 | │ Column #1 │ Column #2 │ 3 | ├───────────┼───────────┤ 4 | │ 1 │ 1-2 │ 5 | │ 3 │ 3-2 │ 6 | └───────────┴───────────┘ 7 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Rows/Insert.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌───────────┐ 2 | │ Column #1 │ 3 | ├───────────┤ 4 | │ 1 │ 5 | │ 3 │ 6 | │ 2 │ 7 | └───────────┘ 8 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Table/Rows/Remove.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌───────────┐ 2 | │ Column #1 │ 3 | ├───────────┤ 4 | │ 1 │ 5 | │ 3 │ 6 | └───────────┘ 7 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/TextPath/GH-1307.Output.verified.txt: -------------------------------------------------------------------------------- 1 | ┌─────┐ ┌─────┐ 2 | │ Baz │ │ Qux │ 3 | └─────┘ └─────┘ 4 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Expectations/Widgets/Tree/Render_NoChildren.Output.verified.txt: -------------------------------------------------------------------------------- 1 | Root node 2 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Extensions/ConsoleKeyExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests; 2 | 3 | public static class ConsoleKeyExtensions 4 | { 5 | public static ConsoleKeyInfo ToConsoleKeyInfo(this ConsoleKey key) 6 | { 7 | var ch = (char)key; 8 | if (char.IsControl(ch)) 9 | { 10 | ch = '\0'; 11 | } 12 | 13 | return new ConsoleKeyInfo(ch, key, false, false, false); 14 | } 15 | } -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Extensions/StreamExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests; 2 | 3 | public static class StreamExtensions 4 | { 5 | public static string ReadText(this Stream stream) 6 | { 7 | if (stream is null) 8 | { 9 | throw new ArgumentNullException(nameof(stream)); 10 | } 11 | 12 | using (var reader = new StreamReader(stream)) 13 | { 14 | return reader.ReadToEnd(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Utilities/GitHubIssueAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests; 2 | 3 | [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] 4 | public sealed class GitHubIssueAttribute : Attribute 5 | { 6 | public string Url { get; } 7 | 8 | public GitHubIssueAttribute(string url) 9 | { 10 | Url = url; 11 | } 12 | } -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/Utilities/ModuleInitializerAttribute.cs: -------------------------------------------------------------------------------- 1 | #if !NET6_0_OR_GREATER 2 | namespace System.Runtime.CompilerServices; 3 | 4 | [AttributeUsage(AttributeTargets.Method, Inherited = false)] 5 | public sealed class ModuleInitializerAttribute : Attribute 6 | { 7 | } 8 | #endif -------------------------------------------------------------------------------- /src/Tests/Spectre.Console.Tests/VerifyConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace Spectre.Console.Tests; 2 | 3 | public static class VerifyConfiguration 4 | { 5 | [ModuleInitializer] 6 | public static void Init() 7 | { 8 | Verifier.DerivePathInfo(Expectations.Initialize); 9 | } 10 | } 11 | --------------------------------------------------------------------------------