mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-01 20:34:57 +01:00
Start the scenery editor from its own button and note launches
With no scenery selected the button starts a new one in the editor. Each launch notes the scenery, the timetable number and the vehicles for the tapes. Tools work on the selected scenery, and an emptied consist stays listed.
This commit is contained in:
@@ -55,11 +55,28 @@ public class SimulatorExitTests
|
||||
? ("cmd", new[] { "/c", "echo boom 1>&2 & exit 3" })
|
||||
: ("/bin/sh", new[] { "-c", "echo boom >&2; exit 3" });
|
||||
|
||||
var process = launcher.Start(shell, script, null, captureErrors: true, out string? error);
|
||||
var process = launcher.Start(shell, script, null, new Dictionary<string, string>(), captureErrors: true,
|
||||
out string? error);
|
||||
Assert.Null(error);
|
||||
await process!.WaitForExitAsync();
|
||||
|
||||
Assert.Equal(3, process.ExitCode);
|
||||
Assert.Equal("boom", Assert.Single(process.ErrorTail).Trim());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task A_real_process_gets_the_environment_it_was_given()
|
||||
{
|
||||
var launcher = new SystemProcessLauncher(new TestInstallation().Log);
|
||||
var (shell, script) = OperatingSystem.IsWindows()
|
||||
? ("cmd", new[] { "/c", "echo %__NV_PRIME_RENDER_OFFLOAD% 1>&2" })
|
||||
: ("/bin/sh", new[] { "-c", "echo $__NV_PRIME_RENDER_OFFLOAD >&2" });
|
||||
|
||||
var process = launcher.Start(shell, script, null,
|
||||
new Dictionary<string, string> { ["__NV_PRIME_RENDER_OFFLOAD"] = "1" },
|
||||
captureErrors: true, out _);
|
||||
await process!.WaitForExitAsync();
|
||||
|
||||
Assert.Equal("1", Assert.Single(process.ErrorTail).Trim());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user