Move submodule and symlink to make paths simpler
This commit is contained in:
parent
6b2d6f29fd
commit
053c54a23e
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -1,3 +1,3 @@
|
|||||||
[submodule "inputs/real"]
|
[submodule "inputs/real"]
|
||||||
path = inputs/real
|
path = inputs/private
|
||||||
url = git@github.com:georgefst/aoc-private-inputs.git
|
url = git@github.com:georgefst/aoc-private-inputs.git
|
||||||
|
|||||||
11
app/Main.hs
11
app/Main.hs
@ -22,14 +22,11 @@ main =
|
|||||||
puzzleTest :: Puzzle a -> TestTree
|
puzzleTest :: Puzzle a -> TestTree
|
||||||
puzzleTest p =
|
puzzleTest p =
|
||||||
testGroup (show p.number) $
|
testGroup (show p.number) $
|
||||||
[ ("examples", "examples")
|
["examples", "real"] <&> \t ->
|
||||||
, ("real/2025", "real")
|
withResource (maybe (fail "parse failure") pure . p.parse =<< readFile ("inputs/" <> t <> "/" <> show p.number)) mempty \input ->
|
||||||
]
|
testGroup t $
|
||||||
<&> \(inFile, outFile) ->
|
|
||||||
withResource (maybe (fail "parse failure") pure . p.parse =<< readFile ("inputs/" <> inFile <> "/" <> show p.number)) mempty \input ->
|
|
||||||
testGroup outFile $
|
|
||||||
[("1", p.part1), ("2", p.part2)] <&> \(n, pp) ->
|
[("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
|
BL.fromStrict . encodeUtf8 . pp.solve <$> input
|
||||||
|
|
||||||
data Puzzle input = Puzzle
|
data Puzzle input = Puzzle
|
||||||
|
|||||||
1
inputs/private
Submodule
1
inputs/private
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit ab940388ba53f2fef932d09aeb44443e2a9407b7
|
||||||
@ -1 +0,0 @@
|
|||||||
Subproject commit ab940388ba53f2fef932d09aeb44443e2a9407b7
|
|
||||||
1
inputs/real
Symbolic link
1
inputs/real
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
private/2025
|
||||||
Loading…
x
Reference in New Issue
Block a user