From fb7e509efccb6651050bbba068e8863f614cc8d4 Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Tue, 12 Feb 2013 14:12:15 +0900 Subject: [PATCH] test for Flag. --- ghc-mod.cabal | 1 + test/FlagSpec.hs | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 test/FlagSpec.hs diff --git a/ghc-mod.cabal b/ghc-mod.cabal index 6cd654c..66723f0 100644 --- a/ghc-mod.cabal +++ b/ghc-mod.cabal @@ -67,6 +67,7 @@ Test-Suite spec Hs-Source-Dirs: test, . Type: exitcode-stdio-1.0 Other-Modules: Expectation + FlagSpec LangSpec ListSpec Build-Depends: base >= 4.0 && < 5 diff --git a/test/FlagSpec.hs b/test/FlagSpec.hs new file mode 100644 index 0000000..1da9090 --- /dev/null +++ b/test/FlagSpec.hs @@ -0,0 +1,14 @@ +module FlagSpec where + +import Control.Applicative +import Test.Hspec +import Expectation +import Flag +import Types + +spec :: Spec +spec = do + describe "listFlags" $ do + it "lists up GHC flags" $ do + flags <- lines <$> listFlags defaultOptions + flags `shouldContain` "-fno-warn-orphans"