-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
I am trying to set a local option for a test but it seems to be ignored by the test runner (defaultMain) of tasty-silver.
#!/usr/bin/env GHC_ENVIRONMENT=- runhaskell -packagetasty-1.4.2 -packagetasty-silver-3.2.2
{-# LANGUAGE OverloadedStrings #-}
import Test.Tasty (TestTree, localOption)
import Test.Tasty.Silver
import Test.Tasty.Silver.Advanced
import Test.Tasty.Silver.Interactive as Silver
main :: IO ()
main = Silver.defaultMain $ localOption (Interactive true) testGolden
where
true = error "This error should be triggered!"
testGolden :: TestTree
testGolden =
goldenTest1
"wrongOutput"
(return $ Just "golden value")
(return "actual value")
(DiffText Nothing) -- always fail
ShowText
(const $ return ()) -- keep the golden file no matter whatWhen applying and then querying the option, this script should crash with error. But it simply runs the test non-interactively.
@phile314: You implemented the test runner. Where should PlusTestOption be usually handled?
Reactions are currently unavailable