test for Flag.

This commit is contained in:
Kazu Yamamoto 2013-02-12 14:12:15 +09:00
parent a8b199ab70
commit fb7e509efc
2 changed files with 15 additions and 0 deletions

View File

@ -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

14
test/FlagSpec.hs Normal file
View File

@ -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"