From 21c40100102dde47056ac7d4513e65761d56d60a Mon Sep 17 00:00:00 2001 From: Nikolay Yakimov Date: Sat, 19 Sep 2015 09:44:57 +0300 Subject: [PATCH] Test for file map logging when temp dir is proj. root subdir --- test/FileMappingSpec.hs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/FileMappingSpec.hs b/test/FileMappingSpec.hs index f3c0a3d..d1e155e 100644 --- a/test/FileMappingSpec.hs +++ b/test/FileMappingSpec.hs @@ -163,6 +163,14 @@ spec = do mapM_ (uncurry loadMappedFile) fm checkSyntax ["File.hs"] res `shouldBe` "File.hs:3:1:Warning: Top-level binding with no type signature: main :: IO ()\n" + it "works with full path as well" $ do + withDirectory_ "test/data/file-mapping/preprocessor" $ do + cwd <- getCurrentDirectory + let fm = [("File.hs", cwd "File_Redir.hs")] + res <- run defaultOptions $ do + mapM_ (uncurry loadMappedFile) fm + checkSyntax ["File.hs"] + res `shouldBe` "File.hs:3:1:Warning: Top-level binding with no type signature: main :: IO ()\n" it "checks in-memory file" $ do withDirectory_ "test/data/file-mapping/preprocessor" $ do src <- readFile "File_Redir.hs"