@@ -64,7 +64,7 @@ hlintTests = testGroup "hlint suggestions" [
64
64
65
65
executeCodeAction (fromJust redId)
66
66
67
- contents <- getDocumentEdit doc
67
+ contents <- skipManyTill anyMessage $ getDocumentEdit doc
68
68
liftIO $ contents @?= " main = undefined\n foo x = x\n "
69
69
70
70
, testCase " falls back to pre 3.8 code actions" $ runSession hlsCommand noLiteralCaps " test/testdata/hlint" $ do
@@ -77,7 +77,7 @@ hlintTests = testGroup "hlint suggestions" [
77
77
78
78
executeCommand etaReduce
79
79
80
- contents <- skipManyTill publishDiagnosticsNotification $ getDocumentEdit doc
80
+ contents <- skipManyTill anyMessage $ getDocumentEdit doc
81
81
liftIO $ contents @?= " main = undefined\n foo = id\n "
82
82
83
83
, testCase " changing configuration enables or disables hlint diagnostics" $ runSession hlsCommand fullCaps " test/testdata/hlint" $ do
@@ -214,7 +214,7 @@ packageTests = testGroup "add package suggestions" [
214
214
215
215
executeCodeAction action
216
216
217
- contents <- getDocumentEdit . TextDocumentIdentifier =<< getDocUri " add-package-test.cabal"
217
+ contents <- skipManyTill anyMessage $ getDocumentEdit . TextDocumentIdentifier =<< getDocUri " add-package-test.cabal"
218
218
liftIO $
219
219
any (\ l -> " text -any" `T.isSuffixOf` l || " text : {} -any" `T.isSuffixOf` l) (T. lines contents) @? " Contains text package"
220
220
@@ -243,7 +243,7 @@ packageTests = testGroup "add package suggestions" [
243
243
244
244
executeCodeAction action
245
245
246
- contents <- getDocumentEdit . TextDocumentIdentifier =<< getDocUri " package.yaml"
246
+ contents <- skipManyTill anyMessage $ getDocumentEdit . TextDocumentIdentifier =<< getDocUri " package.yaml"
247
247
liftIO $ do
248
248
" zlib" `T.isSuffixOf` (T. lines contents !! 3 ) @? " Contains zlib"
249
249
" zlib" `T.isSuffixOf` (T. lines contents !! 21 ) @? " Does not contain zlib in unrelated component"
@@ -415,7 +415,7 @@ unusedTermTests = testGroup "unused term code actions" [
415
415
--
416
416
-- executeCodeAction $ head cas
417
417
--
418
- -- edit <- getDocumentEdit doc
418
+ -- edit <- skipManyTill anyMessage $ getDocumentEdit doc
419
419
--
420
420
-- let expected = [ "{-# OPTIONS_GHC -Wall #-}"
421
421
-- , "module UnusedTerm () where"
0 commit comments