From acf4bc22ca4ae05abb7d83d8ed4fcff9de1cbbe5 Mon Sep 17 00:00:00 2001 From: Dylan Beattie Date: Sat, 7 Sep 2024 11:12:48 +0100 Subject: [PATCH] FIX: Stupid bug where part-1 / part-2 files will read their own source code as input ...Dylan doesn't know how to use String.Replace. D'oh. --- Starship/Rockstar.Test/RockFile.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Starship/Rockstar.Test/RockFile.cs b/Starship/Rockstar.Test/RockFile.cs index 527906a..795a01f 100644 --- a/Starship/Rockstar.Test/RockFile.cs +++ b/Starship/Rockstar.Test/RockFile.cs @@ -108,8 +108,8 @@ public bool ExtractedExpectedError(string label, out string? error) { public Queue? SimulateInputs() { foreach (var path in new[] { AbsolutePath + ".in", - AbsolutePath.Replace("-part-1.rock", ".rock.in"), - AbsolutePath.Replace("-part-2.rock", ".rock.in") + AbsolutePath.Replace("-part-1.rock", ".rock") + ".in", + AbsolutePath.Replace("-part-2.rock", ".rock") + ".in" }) { if (File.Exists(path)) return new(File.ReadAllLines(path)); }