From c63f04a926142d447a9413a905ad436000140a0a Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Wed, 13 Feb 2013 14:30:15 +0900 Subject: [PATCH] proper test for gitDirs. --- test/CabalSpec.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/CabalSpec.hs b/test/CabalSpec.hs index eda834b..0be2427 100644 --- a/test/CabalSpec.hs +++ b/test/CabalSpec.hs @@ -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"])