Marek
57dd8ee410
#1718 TestConsole can now be configured and accessed in CommandAppTester ( #1803 )
...
* TestConsole can now be configured and accessed in CommandAppTester
* Add test with mocked user inputs for interactive command
* Add documentation for using the CommandAppTester
Co-authored-by: Patrik Svensson <patriksvensson@users.noreply.github.com>
Co-authored-by: Marek Magath <Marek.Magath@solarwinds.com>
2025-04-14 10:38:03 +02:00
martincostello
6105ee2a86
Fix IndexOutOfRangeException
...
Fix `IndexOutOfRangeException` if an exception does not have an associated stack trace.
Resolves #1798 .
2025-04-09 12:36:53 +02:00
Patrik Svensson
68fcfe0de4
Update dependencies and .NET SDK
2025-04-08 17:30:03 +02:00
Frank Ray
958820dd66
Tighten up when to show/hide the application "-v|--version" option.
2025-04-08 16:53:43 +02:00
Frank Ray
c4a97f3c89
Improved unit test coverage using Spectre.Console.Tests.Data.VersionCommand
2025-04-08 16:53:43 +02:00
Frank Ray
4ac88b5d3f
Help writer unit tests; including coverage of when the -v|--version should (and shouldn't) appear in the help output
2025-04-08 16:53:43 +02:00
Frank Ray
c937c8800a
Updated test names for better self-documentation
2025-04-08 16:43:49 +02:00
Frank Ray
349eac1e22
Bug fix: Tests with remaining args should not be expected to pass strict parsing
2025-04-08 16:43:49 +02:00
Frank Ray
2f8a38f169
Add strict parsing to all version tests, an obvious omission in main
2025-04-08 16:43:49 +02:00
Frank Ray
e9f9f56189
Check if the command has a version option on its setting class
2025-04-08 16:43:49 +02:00
Frank Ray
cefb51df7b
Unit tests to ensure VersionCommand executes when -v|--version is specified, rather than showing the ApplicationVersion number
2025-04-08 16:43:49 +02:00
Frank Ray
75b3b83210
Removed unnecessary using directive
2025-04-08 16:43:49 +02:00
Frank Ray
dfdd129dd0
Display the application version (if set) when a version flag is the first argument, even if a default command has been set.
2025-04-08 16:43:49 +02:00
Frank Ray
17c7a4f7d6
Cover -v and --version options in unit tests
2025-04-08 16:43:49 +02:00
Frank Ray
520efe07e2
Significant improvement to the command line parsing
2025-04-08 16:38:37 +02:00
Frank Ray
c81bc5fe1d
Fix tests with incorrect validation that were in the main branch
...
Tests had incorrect expectations for the parsing of branch + default command arguments
2025-04-08 16:38:37 +02:00
Frank Ray
edf7f23957
Add strict parsing to almost all branches tests, an obvious omission
2025-04-08 16:38:37 +02:00
Frank Ray
80a8b0e406
Cosmetic: Remove ugly looking variable naming
2025-04-08 16:38:37 +02:00
Frank Ray
dca67da8cd
New unit tests to ensure unknown flags are added to remaining args
2025-04-08 16:38:37 +02:00
Mostafa Attia
540fb0195f
Upgrade SixLabors.ImageSharp to 3.1.7
2025-03-23 13:44:18 +00:00
Melvin Dommer
93668e92b6
Changed IConfigurator to return IConfigurator instead of void for ( #1762 )
2025-02-24 20:57:23 +00:00
Tonttu
11a320c7c9
Conditionally trim trailing periods of argument and option descriptions ( #1740 )
2025-02-11 21:13:30 +00:00
Cédric Luthi
9d8d3c1d6d
Fix generic exception formatting with shortened types
...
Fixes #1754
2025-02-05 18:20:21 +01:00
Cédric Luthi
7e1142df58
Add tests for generic exception formatting
2025-02-05 18:20:21 +01:00
Eduardo Tolino
a6b96e9297
Include resource files for additional cultures in HelpProvider. ( #1717 )
...
* Creation of Resource files for HelpProvider in the following cultures: it, ja, ko, pt, ru, and zh-Hans.
* Add unit test files and update InlineData for new cultures.
* Include --version option in CommandAppTests.Help.cs and update related output files
2025-01-31 21:23:40 +00:00
Patrik Svensson
f1f633cc72
Merge pull request #1747 from phil-scott-78/spinner-extension
2025-01-28 18:41:34 +01:00
Phil Scott
05ce33615e
Add async spinner extension methods and related documentation
2025-01-28 10:20:24 -05:00
Frank Ray
8c5264d117
Trimming of TestConsole output by CommandAppTester is configurable
2025-01-21 08:39:31 +00:00
Martijn Straathof
58bf89a56a
Implement 3 digit hex parsing ( #1708 )
2024-12-04 16:31:21 +01:00
Tom Deseyn
29ab313bb9
Async overloads for AnsiConsole Prompt/Ask/Confirm. ( #1194 )
...
* Add async overloads for Prompt/Ask/Confirm.
* Added unit test coverage - AskAsync, ConfirmAsync
* Reordered methods to group non-async/async of the same tests together
---------
Co-authored-by: Frank Ray <52075808+FrankRay78@users.noreply.github.com>
2024-11-28 10:56:19 +00:00
Phil Scott
ab8384acf6
Update PolySharp to version 1.15.0 and remove Nullable package references
2024-11-23 14:47:01 +01:00
Phil Scott
b2689be3ed
Enhance ExceptionFormatter for AOT compatibility by adding fallback handling for stack frames.
2024-11-22 22:55:01 +01:00
Phil Scott
835143d95f
Add Native AOT support documentation and update project files for AOT compatibility
2024-11-22 22:55:01 +01:00
Phil Scott
8f2a859087
Fallback to using GetConverter if GetIntrinsicConverter doesn't find one.
2024-11-22 22:55:01 +01:00
Phil Scott
2be8e8da4e
Adds fallback for ExceptionFormatter in AOT
2024-11-22 22:55:01 +01:00
Phil Scott
2a8810affd
Explicitly marks Spectre.Console.Cli as not trimmable and not appropriate for AOT scenarios. Additionally adds a warning to CommandApp for users who may try it.
2024-11-22 22:55:01 +01:00
Phil Scott
e1d21e7e61
Adding polysharp properly
2024-11-22 22:55:01 +01:00
Phil Scott
c7c3ebdf57
Fix assembly name retrieval for FSharp.Core in TypeNameHelper to work better in AOT scenarios
2024-11-22 22:55:01 +01:00
Phil Scott
b67af32423
Add RequiresDynamicCode attribute to exception formatter to indicate incompatability with AOT
2024-11-22 22:55:01 +01:00
Phil Scott
10773a5625
Refactor enum value retrieval to use EnumUtils for better compatibility with NetStandard 2.0 and AOT
2024-11-22 22:55:01 +01:00
Phil Scott
4802751357
Add AOT compatibility and PolySharp package support
2024-11-22 22:55:01 +01:00
Frank Ray
4515d89705
ProgressTask.GetPercentage() returns 100 when max value is 0 ( #1694 )
2024-11-22 12:44:00 +01:00
Phil Scott
69689d2ba1
Changes Emoji dictionary to OrdinalIgnoreCase for performance
...
This code is ran on startup, and instantiating a new InvariantCultureIgnoreCase was taking up 11ms, which was half the time in AOT.
2024-11-20 17:55:33 -05:00
Tim Pilius
aa9e5c48c6
Adding TransferSpeedColumn configuration to display bits/bytes + binary/decimal prefixes ( #904 )
...
* Adding configuration to TransferSpeedColumn to be able to display in both bytes/bits, as well as using binary/decimal prefix definitions.
---------
Co-authored-by: Frank Ray <52075808+FrankRay78@users.noreply.github.com>
2024-11-19 15:41:49 +00:00
PascalSenn
8d06daf355
Fixed typo in Segment
description ( #1687 )
2024-11-19 06:09:22 +01:00
Mattias Karlsson
cecfdc386c
Fix typos ( #1684 )
2024-11-13 15:00:21 +01:00
Patrik Svensson
375a708c43
Add net9.0
support, remove legacy TFM:s ( #1682 )
...
* Update .NET SDK to 9.0.100
* Remove net6.0
* Remove net7.0
* Update dependencies
* Install correct .NET SDK:s in GitHub Actions
2024-11-13 14:54:01 +01:00
Jonathan Sheely
574ead6d46
Added hex color conversion ( #1432 )
...
* Added hex color conversion
---------
Co-authored-by: Frank Ray <52075808+FrankRay78@users.noreply.github.com>
Co-authored-by: Nils Andresen <nils@nils-andresen.de>
2024-11-13 13:35:26 +01:00
BlazeFace
a87277e859
Adding Enricher for Azure Pipelines ( #1675 )
2024-11-04 16:30:35 +01:00
BlazeFace
3eb620a44e
Fix typo
2024-10-26 07:27:31 -07:00