proper test for gitDirs.

This commit is contained in:
Kazu Yamamoto 2013-02-13 14:30:15 +09:00
parent dd6ade19b3
commit c63f04a926
1 changed files with 2 additions and 1 deletions

View File

@ -17,6 +17,7 @@ spec = do
describe "getDirs" $ do
it "obtains two directories and a cabal file" $ do
len <- length <$> getCurrentDirectory
withDirectory "test/data/subdir1/subdir2" $ do
(x,y,z) <- fromCabal []
(x,y,z) `shouldBe` (["-XHaskell98"],["/Users/kazu/work/ghc-mod/test/data","/Users/kazu/work/ghc-mod/test/data/subdir1/subdir2"],["Cabal","base","containers","convertible","directory","filepath","ghc","ghc-paths","ghc-syb-utils","hlint","hspec","io-choice","old-time","process","regex-posix","syb","time","transformers"])
(x, map (drop len) y, z) `shouldBe` (["-XHaskell98"],["/test/data","/test/data/subdir1/subdir2"],["Cabal","base","containers","convertible","directory","filepath","ghc","ghc-paths","ghc-syb-utils","hlint","hspec","io-choice","old-time","process","regex-posix","syb","time","transformers"])