Fix CommandLineOptionIsReserved provider placeholder and align validator message assertions#7771
Merged
Merged
Conversation
Agent-Logs-Url: https://github.com/microsoft/testfx/sessions/8614ece4-f80d-4fb5-b412-b5f4974c66ea Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix pre-existing bug in CommandLineOptionIsReserved resource string
Fix Apr 22, 2026
CommandLineOptionIsReserved provider placeholder and align validator message assertions
Evangelink
reviewed
Apr 22, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a formatting issue in the CommandLineOptionIsReserved localized resource so reserved-option validation errors can display the offending provider name(s) (instead of repeating the option name), and updates unit tests accordingly.
Changes:
- Corrected
CommandLineOptionIsReservedplaceholder usage from{0}/{0}to{0}/{1}. - Updated
CommandLineHandlerTestsassertions to validate provider names and avoid provider-order assumptions. - Regenerated affected
.xlflocalization artifacts to reflect the updated source string.
Show a summary per file
| File | Description |
|---|---|
| test/UnitTests/Microsoft.Testing.Platform.UnitTests/CommandLine/CommandLineHandlerTests.cs | Updates assertions to match the corrected reserved-option error message behavior. |
| src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.resx | Fixes the resource string placeholder so provider names are displayed correctly. |
| src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hant.xlf | Syncs XLF CommandLineOptionIsReserved source/target with updated placeholder. |
| src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hans.xlf | Syncs XLF CommandLineOptionIsReserved source/target with updated placeholder. |
| src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.tr.xlf | Syncs XLF CommandLineOptionIsReserved source/target with updated placeholder. |
| src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ru.xlf | Syncs XLF CommandLineOptionIsReserved source/target with updated placeholder. |
| src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pt-BR.xlf | Syncs XLF CommandLineOptionIsReserved source/target with updated placeholder. |
| src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pl.xlf | Syncs XLF CommandLineOptionIsReserved source/target with updated placeholder. |
| src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ko.xlf | Syncs XLF CommandLineOptionIsReserved source/target with updated placeholder. |
| src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ja.xlf | Syncs XLF CommandLineOptionIsReserved source/target with updated placeholder. |
| src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.it.xlf | Syncs XLF CommandLineOptionIsReserved source/target with updated placeholder. |
| src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.fr.xlf | Syncs XLF CommandLineOptionIsReserved source/target with updated placeholder. |
| src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.es.xlf | Syncs XLF CommandLineOptionIsReserved source/target with updated placeholder. |
| src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.de.xlf | Syncs XLF CommandLineOptionIsReserved source/target with updated placeholder. |
| src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.cs.xlf | Syncs XLF CommandLineOptionIsReserved source/target with updated placeholder. |
Copilot's findings
- Files reviewed: 15/15 changed files
- Comments generated: 13
Agent-Logs-Url: https://github.com/microsoft/testfx/sessions/a29ba3ca-cdea-458d-b06e-bedaf5608c6d Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Evangelink
approved these changes
Apr 22, 2026
YuliiaKovalova
approved these changes
Apr 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CommandLineOptionIsReservedinPlatformResources.resxused{0}for both placeholders, so reserved-option errors repeated the option name instead of showing offending provider names. This change wires the second placeholder correctly and aligns tests with the intended behavior.Resource string correction
CommandLineOptionIsReservedfrom:Option '--{0}' is reserved and cannot be used by providers: '{0}'Option '--{0}' is reserved and cannot be used by providers: '{1}'Localization artifact update
PlatformResources.*.xlffiles to keep localized resources in sync with the.resxsource change.Command-line validator test updates
CommandLineHandlerTestsassertions to validate provider names in reserved-option failures.