Skip to content

Commit

Permalink
Fix tests broken by haskell#287
Browse files Browse the repository at this point in the history
  • Loading branch information
berberman committed Mar 9, 2021
1 parent b5402c9 commit 8079ee2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/BiosTests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ import System.Info.Extra ( isWindows )
import System.IO.Temp
import System.Exit (ExitCode(ExitSuccess, ExitFailure))
import Control.Monad.Extra (unlessM)
import DynFlags (dynamicGhc)

argDynamic :: [String]
argDynamic = ["-dynamic" | dynamicGhc]

main :: IO ()
main = do
Expand Down Expand Up @@ -56,7 +60,7 @@ main = do
runCradle (cradleOptsProg crdl) (const (pure ())) "./a/A.hs"
>>= \case
CradleSuccess r ->
componentOptions r `shouldMatchList` ["a"]
componentOptions r `shouldMatchList` ["a"] <> argDynamic
_ -> expectationFailure "Cradle could not be loaded"

, testCaseSteps "Can load symlinked module" $ \step -> do
Expand All @@ -71,7 +75,7 @@ main = do
runCradle (cradleOptsProg crdl) (const (pure ())) "./b/A.hs"
>>= \case
CradleSuccess r ->
componentOptions r `shouldMatchList` ["b"]
componentOptions r `shouldMatchList` ["b"] <> argDynamic
_ -> expectationFailure "Cradle could not be loaded"

, testCaseSteps "Can not load symlinked module that is ignored" $ \step -> do
Expand Down

0 comments on commit 8079ee2

Please sign in to comment.