SIGN IN SIGN UP

fix(dotnet): detect_test_runner_mode must not scan flag values as project paths

explicit_projects scanned every token's raw text for a
.csproj/.fsproj/.vbproj suffix, so a value-taking flag's own value
(e.g. `--results-directory /tmp/MyResults.csproj`) satisfied it too --
making explicit_projects non-empty skips scanning the working directory
entirely, missing the real project there and picking the wrong
TestRunnerMode (and thus the wrong trx-reporting injection). Filtered to
unconsumed Positional tokens only (t.linked.is_none()).

Also extracted detect_test_runner_mode_in_dir(tokens, scan_dir) so the
directory-scan branch takes its target directory as a parameter instead
of hardcoding ".", making the new regression test deterministic (an
isolated tempdir) instead of racing on the real process cwd across
parallel test threads.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
N
Nicolas Le Cam committed
f9a53d046df82e03da933566418852d3716d4e8e
Parent: f83be19