adding a test for foreign export.
This commit is contained in:
parent
4a02a02409
commit
463ab9a26f
@ -31,6 +31,11 @@ spec = do
|
||||
res <- runID $ checkSyntax ["Baz.hs"]
|
||||
res `shouldSatisfy` ("Baz.hs:5:1:Warning:" `isPrefixOf`)
|
||||
|
||||
it "works with foreign exports" $ do
|
||||
withDirectory_ "test/data" $ do
|
||||
res <- runID $ checkSyntax ["ForeignExport.hs"]
|
||||
res `shouldBe` ""
|
||||
|
||||
context "when no errors are found" $ do
|
||||
it "doesn't output an empty line" $ do
|
||||
withDirectory_ "test/data/ghc-mod-check/Data" $ do
|
||||
|
10
test/data/ForeignExport.hs
Normal file
10
test/data/ForeignExport.hs
Normal file
@ -0,0 +1,10 @@
|
||||
{-# LANGUAGE ForeignFunctionInterface #-}
|
||||
|
||||
module ForeignExport where
|
||||
|
||||
import Foreign.C.Types
|
||||
|
||||
foreign export ccall foo :: CUInt
|
||||
|
||||
foo :: CUInt
|
||||
foo = 123
|
Loading…
Reference in New Issue
Block a user