File: test.hs

package info (click to toggle)
haskell-hashed-storage 0.4.13-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 276 kB
  • ctags: 73
  • sloc: haskell: 2,019; ansic: 799; makefile: 3
file content (14 lines) | stat: -rw-r--r-- 611 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import Storage.Hashed.Test( tests )
import Test.Framework( defaultMain )
import System.Directory( createDirectory, removeDirectoryRecursive
                       , setCurrentDirectory )
import Codec.Archive.Zip( extractFilesFromArchive, toArchive )
import qualified Data.ByteString.Lazy as BL

main :: IO ()
main = do zip <- toArchive `fmap` BL.readFile "testdata.zip"
          removeDirectoryRecursive "_test_playground" `catch` \_ -> return ()
          createDirectory "_test_playground"
          setCurrentDirectory "_test_playground"
          extractFilesFromArchive [] zip
          defaultMain tests