Fixed tests on Windows

This commit is contained in:
mvoidex
2013-03-31 18:12:34 +04:00
parent 653912a066
commit 6be2b8f56e
3 changed files with 18 additions and 14 deletions

View File

@@ -7,6 +7,7 @@ import Data.List (isSuffixOf, isInfixOf)
import Expectation
import Test.Hspec
import Types
import System.FilePath
spec :: Spec
spec = do
@@ -22,7 +23,7 @@ spec = do
withDirectory_ "test/data/check-test-subdir" $ do
cradle <- getGHCVersion >>= findCradle Nothing . fst
res <- checkSyntax defaultOptions cradle "test/Bar/Baz.hs"
res `shouldSatisfy` ("test/Foo.hs:3:1:Warning: Top-level binding with no type signature: foo :: [Char]\NUL\n" `isSuffixOf`)
res `shouldSatisfy` (("test" </> "Foo.hs:3:1:Warning: Top-level binding with no type signature: foo :: [Char]\NUL\n") `isSuffixOf`)
it "can detect mutually imported modules" $ do
withDirectory_ "test/data" $ do