Skip to content

Commit e84f658

Browse files
committed
Fix progress tests
1 parent f0d162b commit e84f658

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test/functional/Progress.hs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ tests =
2828
runSession hlsCommand progressCaps "test/testdata" $ do
2929
let path = "hlint" </> "ApplyRefact2.hs"
3030
_ <- openDoc path "haskell"
31-
expectProgressReports [pack ("Setting up hlint (for " ++ path ++ ")"), "Processing"]
31+
expectProgressReports [pack ("Setting up hlint (for " ++ path ++ ")"), "Processing", "Indexing"]
3232
, testCase "eval plugin sends progress reports" $
3333
runSession hlsCommand progressCaps "plugins/hls-eval-plugin/test/testdata" $ do
3434
doc <- openDoc "T1.hs" "haskell"
35-
expectProgressReports ["Setting up testdata (for T1.hs)", "Processing"]
35+
expectProgressReports ["Setting up testdata (for T1.hs)", "Processing", "Indexing"]
3636
[evalLens] <- getCodeLenses doc
3737
let cmd = evalLens ^?! L.command . _Just
3838
_ <- sendRequest SWorkspaceExecuteCommand $ ExecuteCommandParams Nothing (cmd ^. L.command) (decode $ encode $ fromJust $ cmd ^. L.arguments)
@@ -41,14 +41,14 @@ tests =
4141
runSession hlsCommand progressCaps "test/testdata/format" $ do
4242
sendNotification SWorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig "ormolu"))
4343
doc <- openDoc "Format.hs" "haskell"
44-
expectProgressReports ["Setting up testdata (for Format.hs)", "Processing"]
44+
expectProgressReports ["Setting up testdata (for Format.hs)", "Processing", "Indexing"]
4545
_ <- sendRequest STextDocumentFormatting $ DocumentFormattingParams Nothing doc (FormattingOptions 2 True Nothing Nothing Nothing)
4646
expectProgressReports ["Formatting Format.hs"]
4747
, testCase "fourmolu plugin sends progress notifications" $ do
4848
runSession hlsCommand progressCaps "test/testdata/format" $ do
4949
sendNotification SWorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig "fourmolu"))
5050
doc <- openDoc "Format.hs" "haskell"
51-
expectProgressReports ["Setting up testdata (for Format.hs)", "Processing"]
51+
expectProgressReports ["Setting up testdata (for Format.hs)", "Processing", "Indexing"]
5252
_ <- sendRequest STextDocumentFormatting $ DocumentFormattingParams Nothing doc (FormattingOptions 2 True Nothing Nothing Nothing)
5353
expectProgressReports ["Formatting Format.hs"]
5454
, ignoreTestBecause "no liquid Haskell support" $
@@ -90,7 +90,6 @@ expectProgressReports xs = expectProgressReports' [] xs
9090
CreateM msg ->
9191
expectProgressReports' (token msg : tokens) expectedTitles
9292
BeginM msg -> do
93-
liftIO $ title msg `expectElem` ("Indexing references from:":xs)
9493
liftIO $ token msg `expectElem` tokens
9594
expectProgressReports' tokens (delete (title msg) expectedTitles)
9695
ProgressM msg -> do

0 commit comments

Comments
 (0)