You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(naming): regression for get_current_location title-on-claim fix
Two xUnit cases pinned to PowerShellTools.GetCurrentLocation:
- GetCurrentLocation_ConsoleSwitched_SetsWindowTitle verifies that
SetWindowTitleAsync is called when FindReadyPipeAsync reports a
newly-claimed (unowned) pipe. Without 5b3ae35's fix this test
fails with Moq.MockException ("Expected invocation on the mock at
least once, but was never performed").
- GetCurrentLocation_NotSwitched_DoesNotSetWindowTitle is the
companion guard: established consoles must not re-trigger
TryAssignNameToPid + SetWindowTitleAsync on every call, otherwise
the round-trip is wasted (TryAssignNameToPid is idempotent and
returns null on the second call) and the established title would
be at risk of accidental rename if the queue logic ever changes.
Verified locally by toggling the if (consoleSwitched) block in
PowerShellTools.cs:109 — the first test fails as designed when the
guard is removed and passes when restored.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments