Commits

Bryan O'Sullivan committed 88860ec

Add a simple test

  • Participants
  • Parent commits 593d455

Comments (0)

Files changed (1)

File tests/TestLoad.hs

+{-# LANGUAGE ScopedTypeVariables #-}
+
+import Control.Exception (SomeException, try)
+import Control.Monad (forM_)
+import Data.Configurator
+import System.Environment
+
+main = do
+  args <- getArgs
+  putStrLn $ "files: " ++ show args
+  e <- try $ load args
+  case e of
+    Left (err::SomeException) -> putStrLn $ "error: " ++ show err
+    Right c -> putStr "ok: " >> display c