Skip to content

RunFileTests: bring missing changes from 10.0.4xx - #54087

Merged
jjonescz merged 2 commits into
dotnet:mainfrom
jjonescz:sprint-missing-main-tests
Apr 28, 2026
Merged

jjonescz merged 2 commits into
dotnet:mainfrom
jjonescz:sprint-missing-main-tests

Conversation

@jjonescz

@jjonescz jjonescz commented Apr 27, 2026 •

Copy link
Copy Markdown
Member

Some changes were missed during automatic flows, probably due to badly resolved merge conflicts.

@jjonescz jjonescz added the Area-run-file Items related to the "dotnet run <file>" effort label Apr 27, 2026
@jjonescz
jjonescz marked this pull request as ready for review April 27, 2026 10:34
@jjonescz
jjonescz requested review from a team and Copilot April 27, 2026 10:34

Copilot AI left a comment

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.

Pull request overview

Brings in missed test coverage changes from 10.0.4xx, primarily expanding validation around file-based program directives (notably #:ref), warning behavior, and some output assertion tightening.

Changes:

  • Added extensive new tests for #:ref directive behavior (paths, errors, transitivity, cycles, feature flagging, and interactions with #:include).
  • Added tests and adjusted assertions around dotnet run warning/no-warning scenarios and missing shebang warning (CA2266).
  • Introduced a shared test helper to enable the experimental #:ref directive via Directory.Build.props.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
test/dotnet.Tests/CommandTests/Run/RunFileTests_General.cs Adds stdin #:ref test and expands dotnet run warning/no-warning coverage; tightens stdout/stderr assertions.
test/dotnet.Tests/CommandTests/Run/RunFileTests_Directives.cs Adds comprehensive #:ref directive test suite; adjusts include-mapping test line numbers due to shebang insertion.
test/dotnet.Tests/CommandTests/Run/RunFileTests_CscOnlyAndApi.cs Adds tests covering up-to-date / csc-only behavior with #:ref, VirtualProjectBuilder PRE lifetime regression tests, and a virtual PRE creation test.
test/dotnet.Tests/CommandTests/Run/RunFileTests_BuildOptions.cs Adds missing-shebang CA2266 warning tests; removes some now-unneeded test setup noise.
test/dotnet.Tests/CommandTests/Run/RunFileTests_BuildCommands.cs Removes trailing whitespace (no functional change).
test/dotnet.Tests/CommandTests/Run/RunFileTestBase.cs Adds EnableRefDirective helper and binlog evaluation count helper support.
test/dotnet.Tests/CommandTests/Project/Convert/DotnetProjectConvertTests.cs Adds conversion tests for #:ref (direct, transitive, collisions, item copy/delete, and conversion scoping).

@jjonescz
jjonescz merged commit 65decd4 into dotnet:main Apr 28, 2026
24 checks passed
@jjonescz
jjonescz deleted the sprint-missing-main-tests branch April 28, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-run-file Items related to the "dotnet run <file>" effort

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants