Skip to content
This repository has been archived by the owner on Oct 12, 2024. It is now read-only.

Commit

Permalink
FIX: Stupid bug where part-1 / part-2 files will read their own sourc…
Browse files Browse the repository at this point in the history
…e code as input

...Dylan doesn't know how to use String.Replace. D'oh.
  • Loading branch information
dylanbeattie committed Sep 7, 2024
1 parent d7c4191 commit acf4bc2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Starship/Rockstar.Test/RockFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ public bool ExtractedExpectedError(string label, out string? error) {
public Queue<string>? 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));
}
Expand Down

0 comments on commit acf4bc2

Please sign in to comment.