Look for the simulator when the picked one is not in this installation

The pick is kept in the per-user eu07.ini, which every installation shares,
so a binary chosen in one folder was missing in another and the starter
complained although a simulator sat right there. A missing pick now gives
way to the search and is logged once.
This commit is contained in:
maj00r
2026-10-04 18:58:29 +02:00
parent 2e7e967279
commit 6a8750566e
2 changed files with 52 additions and 1 deletions

View File

@@ -68,6 +68,31 @@ public class ExecutableLocatorTests
Assert.Equal(ExeProblem.None, problem);
}
[Fact]
public void A_pick_from_another_installation_gives_way_to_the_search()
{
var files = new InMemoryFileSystem().WithExecutable(TestInstallation.At("eu07"), Elf);
var installation = new TestInstallation(files);
var settings = new SimulatorSettings { SelectExeAutomatically = false, ExecutablePath = "eu07-elsewhere" };
string resolved = installation.Executables.Resolve(settings, out var problem);
Assert.EndsWith("eu07", resolved);
Assert.Equal(ExeProblem.None, problem);
}
[Fact]
public void A_missing_pick_is_reported_when_the_installation_has_none_either()
{
var installation = new TestInstallation();
var settings = new SimulatorSettings { SelectExeAutomatically = false, ExecutablePath = "eu07-elsewhere" };
string resolved = installation.Executables.Resolve(settings, out var problem);
Assert.Equal("eu07-elsewhere", resolved);
Assert.Equal(ExeProblem.NotFound, problem);
}
[Fact]
public void Data_files_beside_the_binary_are_never_offered_as_candidates()
{