Take code page 1250 in the trainset save tests from LegacyText

The tests asked Encoding for it before anything had registered the code pages.
That held only when another test had made an InMemoryFileSystem first, so the
class failed when it ran first, as it did on Linux in CI.
This commit is contained in:
maj00r
2026-11-03 20:42:28 +01:00
parent 39d4ef0bc4
commit 16d665156c

View File

@@ -23,7 +23,9 @@ public class SceneryTrainsetSaveTests
"endtrainset\r\n" +
"// koniec pliku z polską literą: żółw\r\n";
private static Encoding Cp1250 => Encoding.GetEncoding(1250);
// The application's own, which registers the code pages first; this class may be
// the first to need them, before any InMemoryFileSystem exists.
private static Encoding Cp1250 => LegacyText.CodePage1250;
private static (InMemoryFileSystem Files, Scenery Scenery, SaveSceneryTrainset Save) Setup(string scn) =>
Setup(Cp1250.GetBytes(scn));