mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-19 15:02:15 +01:00
fix(settings): an imported ini moved to the trains' tapes too, a closed tape window forgets only its own tape
- ImportFrom moves an ini of before the trains' tapes as a profile is - HaslerTapes.Forget takes the file: a window closing lets go of its own tape, not of the one another window follows
This commit is contained in:
@@ -1436,6 +1436,24 @@ public class SettingsStoreTests
|
||||
Assert.False(installation.SettingsStore.Settings.PhysicsLogTrains);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void An_imported_ini_from_before_the_tapes_of_the_trains_is_moved_as_a_profile_is()
|
||||
{
|
||||
string backup = Path.Combine("/home/kolejarz", "backup", "eu07.ini");
|
||||
var files = new InMemoryFileSystem()
|
||||
.WithFile(UserIni, "physicslog yes\nphysicslog.trains no\n")
|
||||
.WithFile(backup, "physicslog yes\nblackbox yes\n");
|
||||
var store = WithHome(files).SettingsStore;
|
||||
store.Load();
|
||||
|
||||
Assert.True(store.ImportFrom(backup));
|
||||
store.Save();
|
||||
|
||||
Assert.False(store.Settings.PhysicsLog);
|
||||
Assert.True(store.Settings.PhysicsLogTrains);
|
||||
Assert.Contains("physicslog.trains yes", files.ReadAllText(UserIni, System.Text.Encoding.UTF8));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Once_moved_the_physics_log_of_every_vehicle_turned_on_again_stays_on()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user