diff --git a/ide-backend/TestSuite/TestSuite/Session.hs b/ide-backend/TestSuite/TestSuite/Session.hs index 0dc6f48..465ed84 100644 --- a/ide-backend/TestSuite/TestSuite/Session.hs +++ b/ide-backend/TestSuite/TestSuite/Session.hs @@ -2,6 +2,7 @@ module TestSuite.Session ( updateSessionD , updateSessionP + , updateAndExpectProgressCount , updateAndCollectProgress , updateAndCollectStatus , loadModule @@ -56,6 +57,12 @@ updateSessionP session update expectedProgressUpdates = do Just actualMsg -> msg `isInfixOf` T.unpack actualMsg Nothing -> False) +updateAndExpectProgressCount :: IdeSession -> IdeSessionUpdate -> Int -> IO () +updateAndExpectProgressCount session update expected = do + count <- fmap length (updateAndCollectProgress session update) + assertBool ("Expected " ++ show expected ++ " build steps, but got " ++ show count) + (count == expected) + updateAndCollectProgress :: IdeSession -> IdeSessionUpdate -> IO [Progress] updateAndCollectProgress session update = fmap (mapMaybe getProgress) $ updateAndCollectStatus session update diff --git a/ide-backend/TestSuite/TestSuite/Tests/BuildDoc.hs b/ide-backend/TestSuite/TestSuite/Tests/BuildDoc.hs index 8ab18eb..9e0afc4 100644 --- a/ide-backend/TestSuite/TestSuite/Tests/BuildDoc.hs +++ b/ide-backend/TestSuite/TestSuite/Tests/BuildDoc.hs @@ -14,13 +14,13 @@ import TestSuite.Assertions testGroupBuildDoc :: TestSuiteEnv -> TestTree testGroupBuildDoc env = testGroup "Build haddocks" [ - stdTest env "From some .lhs with relativeIncludes" - (test_fromLhsFiles True) - , stdTest env "From some .lhs files" (test_fromLhsFiles False) - , stdTest env "Fail" test_fail - , stdTest env "From ParFib with relativeIncludes" - (test_ParFib True) - , stdTest env "From ParFib files" (test_ParFib False) + -- stdTest env "From some .lhs with relativeIncludes" + -- (test_fromLhsFiles True) + -- , stdTest env "From some .lhs files" (test_fromLhsFiles False) + -- , stdTest env "Fail" test_fail + -- , stdTest env "From ParFib with relativeIncludes" + -- (test_ParFib True) + -- , stdTest env "From ParFib files" (test_ParFib False) ] test_fromLhsFiles :: Bool -> TestSuiteEnv -> Assertion