Test for no fail on unicode output
This commit is contained in:
parent
f0eb792780
commit
653912a066
@ -7,6 +7,8 @@ import Expectation
|
|||||||
import Info
|
import Info
|
||||||
import Test.Hspec
|
import Test.Hspec
|
||||||
import Types
|
import Types
|
||||||
|
import System.Process
|
||||||
|
import System.Exit
|
||||||
|
|
||||||
spec :: Spec
|
spec :: Spec
|
||||||
spec = do
|
spec = do
|
||||||
@ -48,3 +50,7 @@ spec = do
|
|||||||
cradle <- getGHCVersion >>= findCradle Nothing . fst
|
cradle <- getGHCVersion >>= findCradle Nothing . fst
|
||||||
res <- infoExpr defaultOptions cradle "Main" "bar" "Main.hs"
|
res <- infoExpr defaultOptions cradle "Main" "bar" "Main.hs"
|
||||||
res `shouldSatisfy` ("bar :: [Char]" `isPrefixOf`)
|
res `shouldSatisfy` ("bar :: [Char]" `isPrefixOf`)
|
||||||
|
|
||||||
|
it "doesn't fail on unicode output" $ do
|
||||||
|
code <- rawSystem "dist/build/ghc-mod/ghc-mod" ["info", "test/data/Unicode.hs", "Unicode", "unicode"]
|
||||||
|
code `shouldSatisfy` (== ExitSuccess)
|
||||||
|
4
test/data/Unicode.hs
Normal file
4
test/data/Unicode.hs
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
module Unicode where
|
||||||
|
|
||||||
|
unicode :: α -> α
|
||||||
|
unicode = id
|
Loading…
Reference in New Issue
Block a user