From e48a018f118784a4f2ed2b0cd419475c147456aa Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Thu, 19 Nov 2026 08:50:50 +0100 Subject: [PATCH] Keep the Ctrl+A delete test at the four assemblies it opens Decompiling the sample from ILSpy.Tests.dll auto-loaded that assembly's whole reference closure, so the list held 214 rows and Ctrl+A selected all of them. The tab title became their joined names (about 12,000 characters), and the headless stub fonts took minutes to lay that out inside Avalonia's KeyPress helper, which does not return until the dispatcher queue is empty. The test's own timeouts never ran, and the shard of runuitests.ps1 that contains it never ended. Assisted-by: Claude:claude-fable-5-2:Claude Code --- ILSpy.Tests/AssemblyList/SwitchListAndDeleteAllTests.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ILSpy.Tests/AssemblyList/SwitchListAndDeleteAllTests.cs b/ILSpy.Tests/AssemblyList/SwitchListAndDeleteAllTests.cs index b167fde050..170ce92e7d 100644 --- a/ILSpy.Tests/AssemblyList/SwitchListAndDeleteAllTests.cs +++ b/ILSpy.Tests/AssemblyList/SwitchListAndDeleteAllTests.cs @@ -92,6 +92,9 @@ public async Task Ctrl_A_Then_Delete_Drops_The_Selection_History_And_Tab() // Arrange - boot, decompile something so there is a tab and history to lose, then give // the tree keyboard focus. var (window, vm) = await TestHarness.BootAsync(3); + // Decompiling the sample would otherwise add the test assembly's whole reference closure + // to the list as rows of their own, and Ctrl+A would select every one of them. + AppComposition.Current.GetExport().DecompilerSettings.AutoLoadAssemblyReferences = false; await GiveTheHistorySomethingToHoldAsync(vm); // Collapse again: Ctrl+A selects every visible row, and the tree is normally collapsed // to its assemblies when a user reaches for it. @@ -100,6 +103,8 @@ public async Task Ctrl_A_Then_Delete_Drops_The_Selection_History_And_Tab() await Waiters.WaitForIdleAsync(); var pane = await window.WaitForComponent(); var tree = await pane.WaitForComponent(); + ((System.Collections.IList)tree.ItemsSource!).Count.Should().Be(4, + "Ctrl+A is meant to select the three seeded assemblies and the test assembly, nothing else"); tree.Focus(); Dispatcher.UIThread.RunJobs();