blob: 142d1308146f5750e9b1d16b08d1ac967138b67e [file] [log] [blame]
{-# LANGUAGE OverloadedStrings #-}
module Mulkup.ConfigSpec (cases) where
import Mulkup.Config
import Mulkup.Prelude
import Test.Tasty
import Test.Tasty.HUnit
cases :: TestTree
cases =
testGroup
"ConfigSpec"
[unit_simpleConfig]
unit_simpleConfig :: TestTree
unit_simpleConfig = testCase "unit_simpleConfig" $ do
void $ readConfig exampleConfigText
where
exampleConfigText =
"\
\{ host = \"atmon\" \
\ \
\, stashes = \
\ [ { name = \"mulk\" \
\ \
\ , baseDir = \"/Users/mulk\" \
\ \
\ , tiers = \
\ { hourly = { keep = 48 } \
\ , daily = { keep = 4 } \
\ , weekly = { keep = 4 } \
\ , monthly = { keep = 12 } \
\ } \
\ \
\ , exclusions = \
\ [ \
\ , \"**/.stack-work\" \
\ , \"**/dist-newstyle\" \
\ \
\ , \"~/.boot/cache\" \
\ , \"~/.cabal/bin\" \
\ , \"~/.cabal/packages\" \
\ , \"~/.cache\" \
\ ] \
\ } \
\ ] \
\}"