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

RunFileTests: bring missing changes from 10.0.4xx#54087
jjonescz merged 2 commits into
dotnet:mainfrom
jjonescz:sprint-missing-main-tests

Conversation

@jjonescz

@jjonesczjjonescz commented Apr 27, 2026

Copy link
Copy Markdown
Member

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

@jjonesczjjonescz 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 CopilotApril 27, 2026 10:34

CopilotAI 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
FileDescription
test/dotnet.Tests/CommandTests/Run/RunFileTests_General.csAdds stdin #:ref test and expands dotnet run warning/no-warning coverage; tightens stdout/stderr assertions.
test/dotnet.Tests/CommandTests/Run/RunFileTests_Directives.csAdds comprehensive #:ref directive test suite; adjusts include-mapping test line numbers due to shebang insertion.
test/dotnet.Tests/CommandTests/Run/RunFileTests_CscOnlyAndApi.csAdds 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.csAdds missing-shebang CA2266 warning tests; removes some now-unneeded test setup noise.
test/dotnet.Tests/CommandTests/Run/RunFileTests_BuildCommands.csRemoves trailing whitespace (no functional change).
test/dotnet.Tests/CommandTests/Run/RunFileTestBase.csAdds EnableRefDirective helper and binlog evaluation count helper support.
test/dotnet.Tests/CommandTests/Project/Convert/DotnetProjectConvertTests.csAdds conversion tests for #:ref (direct, transitive, collisions, item copy/delete, and conversion scoping).

Comment threadtest/dotnet.Tests/CommandTests/Run/RunFileTests_CscOnlyAndApi.cs Outdated
Comment threadtest/dotnet.Tests/CommandTests/Run/RunFileTests_BuildOptions.cs Outdated
@jjonescz
jjonescz merged commit 65decd4 into dotnet:mainApr 28, 2026
24 checks passed
@jjonescz
jjonescz deleted the sprint-missing-main-tests branch April 28, 2026 09:07
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@jjonescz@MiYanni