From 053c54a23e3e4adc3d557fe7cd52f001a09521c5 Mon Sep 17 00:00:00 2001 From: George Thomas Date: Tue, 2 Dec 2025 08:51:14 +0000 Subject: [PATCH] Move submodule and symlink to make paths simpler --- .gitmodules | 2 +- app/Main.hs | 11 ++++------- inputs/private | 1 + inputs/real | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) create mode 160000 inputs/private mode change 160000 => 120000 inputs/real diff --git a/.gitmodules b/.gitmodules index 4cfdeb1..4209180 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "inputs/real"] - path = inputs/real + path = inputs/private url = git@github.com:georgefst/aoc-private-inputs.git diff --git a/app/Main.hs b/app/Main.hs index 52b8923..54a99a7 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -22,14 +22,11 @@ main = puzzleTest :: Puzzle a -> TestTree puzzleTest p = testGroup (show p.number) $ - [ ("examples", "examples") - , ("real/2025", "real") - ] - <&> \(inFile, outFile) -> - withResource (maybe (fail "parse failure") pure . p.parse =<< readFile ("inputs/" <> inFile <> "/" <> show p.number)) mempty \input -> - testGroup outFile $ + ["examples", "real"] <&> \t -> + withResource (maybe (fail "parse failure") pure . p.parse =<< readFile ("inputs/" <> t <> "/" <> show p.number)) mempty \input -> + testGroup t $ [("1", p.part1), ("2", p.part2)] <&> \(n, pp) -> - goldenVsString n ("outputs/" <> outFile <> "/" <> show p.number <> "/" <> n) $ + goldenVsString n ("outputs/" <> t <> "/" <> show p.number <> "/" <> n) $ BL.fromStrict . encodeUtf8 . pp.solve <$> input data Puzzle input = Puzzle diff --git a/inputs/private b/inputs/private new file mode 160000 index 0000000..ab94038 --- /dev/null +++ b/inputs/private @@ -0,0 +1 @@ +Subproject commit ab940388ba53f2fef932d09aeb44443e2a9407b7 diff --git a/inputs/real b/inputs/real deleted file mode 160000 index ab94038..0000000 --- a/inputs/real +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ab940388ba53f2fef932d09aeb44443e2a9407b7 diff --git a/inputs/real b/inputs/real new file mode 120000 index 0000000..6a8efa0 --- /dev/null +++ b/inputs/real @@ -0,0 +1 @@ +private/2025 \ No newline at end of file