Skip to content

Add CLI argument parsing tests for GVFS, GVFS.Mount, and FastFetch#1952

Merged
tyrielv merged 1 commit into
microsoft:masterfrom
tyrielv:tyrielv/cli-tests
Apr 30, 2026
Merged

Add CLI argument parsing tests for GVFS, GVFS.Mount, and FastFetch#1952
tyrielv merged 1 commit into
microsoft:masterfrom
tyrielv:tyrielv/cli-tests

Conversation

@tyrielv
Copy link
Copy Markdown
Contributor

@tyrielv tyrielv commented Apr 29, 2026

Add GVFS.CommandLine.Tests project with unit tests for command-line argument parsing across all three executables. Tests validate verb dispatch, argument handling, and error output without requiring a mounted GVFS enlistment.

  • New test project references all three Exe projects (GVFS, GVFS.Mount, FastFetch)
  • Wired into RunUnitTests.bat to run on every PR build
  • 88 test cases covering all verbs and their options

Separate from main .NET 10 migration PR to keep review scope focused.

@tyrielv tyrielv force-pushed the tyrielv/cli-tests branch from 9937c33 to e7728ac Compare April 29, 2026 22:48
@tyrielv tyrielv marked this pull request as ready for review April 29, 2026 23:07
Add GVFS.CommandLine.Tests project with unit tests for command-line
argument parsing across all three executables. Tests validate verb
dispatch, argument handling, and error output without requiring a
mounted GVFS enlistment.

Separate test project (not merged into GVFS.UnitTests) because it
references all three Exe projects (GVFS, GVFS.Mount, FastFetch).

Wire into CI via RunUnitTests.bat so CLI tests run alongside existing
unit tests on every PR build.

Assisted-by: Claude Opus 4.6
Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
@tyrielv tyrielv force-pushed the tyrielv/cli-tests branch from e7728ac to 413ea79 Compare April 29, 2026 23:12
@tyrielv tyrielv enabled auto-merge April 29, 2026 23:13
public void ShortAliases_ParseCorrectly(string alias, string value)
{
var parseResult = rootCommand.Parse(new[] { alias, value });
Assert.That(parseResult.Errors, Is.Empty, $"Parsing '{alias} {value}' should produce no errors");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about cases where it should fail to parse?

@tyrielv tyrielv merged commit 1e381ed into microsoft:master Apr 30, 2026
42 of 45 checks passed
@mjcheetham mjcheetham mentioned this pull request May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants