Initial checkin.
Change-Id: Ib0f503f39cedb6fcc11f80a3b309e4cbb7ed438f
diff --git a/test/Main.hs b/test/Main.hs
new file mode 100644
index 0000000..2dd6130
--- /dev/null
+++ b/test/Main.hs
@@ -0,0 +1,12 @@
+import qualified Mulkup.ConfigSpec
+import Mulkup.Prelude
+import Test.Tasty
+
+main :: IO ()
+main = defaultMain tests
+
+tests :: TestTree
+tests =
+ testGroup
+ "Tests"
+ [Mulkup.ConfigSpec.cases]
diff --git a/test/Mulkup/ConfigSpec.hs b/test/Mulkup/ConfigSpec.hs
new file mode 100644
index 0000000..142d130
--- /dev/null
+++ b/test/Mulkup/ConfigSpec.hs
@@ -0,0 +1,48 @@
+{-# 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\" \
+ \ ] \
+ \ } \
+ \ ] \
+ \}"