Re-enable the InPeek manual test on Windows - #134376
Open
caraioniurie47 wants to merge 1 commit into
Open
caraioniurie47 wants to merge 1 commit into
caraioniurie47 wants to merge 1 commit into
Conversation
InPeek was disabled on Windows for dotnet#40735: once Console.In had read a line, Console.In.Peek() returned -1. StreamReader.Peek() returned -1 without reading whenever its buffer was empty and the previous read had been shorter than the buffer. dotnet#89609 removed that condition in .NET 8. InPeek now passes on Windows, run after ReadLineFromOpenStandardInput as xunit orders the class. Fix dotnet#40735 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @dotnet/area-system-console |
This was referenced Sep 22, 2026
This branch has not been deployed
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.
ConsoleManualTests.InPeekhas carried[ActiveIssue]on Windows for #40735: onceConsole.Inhad read a line,Console.In.Peek()returned -1. The cause was inStreamReader.Peek(), fixed by #89609 in .NET 8; the analysis is in #40735 (comment). This removes the attribute.Tests
Manual tests don't run in CI.
ReadLineFromOpenStandardInputandInPeekwere run withxunit.consolein a console window on a local build, in that order, which is the order xunit uses for the whole class, soInPeekruns afterConsole.ReadLine()has read a line. Both passed.This removes the line next to the manual test added in #133896, so whichever of the two merges second needs a small merge.
Resolves #40735
Note
AI-generated, written at my direction and reviewed by me before posting. Both tests ran on Windows 11 x64 (build 26200), inbox conhost, Debug libraries, with the keys typed into the console by another process (
AttachConsole+WriteConsoleInput) rather than by hand.