No Description
haskell

doctests-posix.hs 504B

12345678910111213141516171819202122232425
  1. {-# LANGUAGE OverloadedStrings #-}
  2. module Main where
  3. import Control.Applicative
  4. import System.Posix.Directory.Traversals
  5. import Test.DocTest
  6. import Test.HUnit
  7. main = do
  8. doctest
  9. [ "-isrc"
  10. , "-XOverloadedStrings"
  11. , "System.Posix.FilePath"
  12. ]
  13. runTestTT unitTests
  14. unitTests :: Test
  15. unitTests = test
  16. [ TestCase $ do
  17. r <- (==) <$> allDirectoryContents "." <*> allDirectoryContents' "."
  18. assertBool "allDirectoryContents == allDirectoryContents'" r
  19. ]