hpath/hpath-io/test/Main.hs

25 lines
584 B
Haskell
Raw Normal View History

2016-05-09 14:53:31 +00:00
{-# LANGUAGE OverloadedStrings #-}
import qualified Data.ByteString as BS
import Data.IORef
2016-05-09 14:53:31 +00:00
import Test.Hspec
import Test.Hspec.Runner
import Test.Hspec.Formatters
import qualified Spec
import Utils
import System.Posix.Temp.ByteString (mkdtemp)
2016-05-09 14:53:31 +00:00
-- TODO: chardev, blockdev, namedpipe, socket
main :: IO ()
main = do
tmpBase <- mkdtemp "/tmp/"
writeIORef baseTmpDir (Just (tmpBase `BS.append` "/"))
2020-01-04 17:14:52 +00:00
putStrLn $ ("Temporary test directory at: " ++ show tmpBase)
2016-05-09 14:53:31 +00:00
hspecWith
2016-05-29 15:32:22 +00:00
defaultConfig { configFormatter = Just progress }
2016-06-05 12:33:53 +00:00
$ afterAll_ deleteBaseTmpDir
$ Spec.spec