= defaultMain =<< goldenTests
do
deckfiles <- findByExtension [".decklist"] "test/golden"
return $ testGroup "Decklist to diff patch" $ do
deckPath <- deckfiles
let diffPath = replaceExtension deckPath ".diff"
return $
goldenVsString
(takeBaseName deckPath)
diffPath
( do
diffContent <- readDiffFiles deckPath (deckPath <.> "new")
let result = view . eval . uncurry diff <$> diffContent
diffAction = BS.fromStrict . BS.pack . T.unpack . fromRight' $ result
return diffAction
)
main