Skip to content

Commit e2d3c2f

Browse files
committed
hls-notes-plugin: Fix tests on windows
1 parent abcf822 commit e2d3c2f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

plugins/hls-notes-plugin/test/NotesTest.hs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Development.IDE.Test
44
import Ide.Plugin.Notes (Log, descriptor)
55
import System.Directory (canonicalizePath)
66
import System.FilePath ((</>))
7-
import Test.Hls
7+
import Test.Hls hiding (waitForBuildQueue)
88

99
plugin :: PluginTestDescriptor Log
1010
plugin = mkPluginTestDescriptor descriptor "notes"
@@ -19,15 +19,15 @@ gotoNoteTests :: TestTree
1919
gotoNoteTests = testGroup "Goto Note Definition"
2020
[ testCase "single_file" $ runSessionWithServer def plugin testDataDir $ do
2121
doc <- openDoc "NoteDef.hs" "haskell"
22-
waitForCustomMessage "ghcide/cradle/loaded" (const $ Just ())
22+
waitForBuildQueue
2323
waitForAllProgressDone
2424
defs <- getDefinitions doc (Position 3 41)
2525
liftIO $ do
2626
fp <- canonicalizePath "NoteDef.hs"
2727
defs @?= InL (Definition (InR [Location (filePathToUri fp) (Range (Position 8 9) (Position 8 9))]))
2828
, testCase "liberal_format" $ runSessionWithServer def plugin testDataDir $ do
2929
doc <- openDoc "NoteDef.hs" "haskell"
30-
waitForCustomMessage "ghcide/cradle/loaded" (const $ Just ())
30+
waitForBuildQueue
3131
waitForAllProgressDone
3232
defs <- getDefinitions doc (Position 5 64)
3333
liftIO $ do
@@ -36,22 +36,23 @@ gotoNoteTests = testGroup "Goto Note Definition"
3636

3737
, testCase "invalid_note" $ runSessionWithServer def plugin testDataDir $ do
3838
doc <- openDoc "NoteDef.hs" "haskell"
39-
waitForCustomMessage "ghcide/cradle/loaded" (const $ Just ())
39+
waitForBuildQueue
4040
waitForAllProgressDone
4141
defs <- getDefinitions doc (Position 6 54)
4242
liftIO $ do
4343
defs @?= InL (Definition (InR []))
4444

4545
, testCase "no_note" $ runSessionWithServer def plugin testDataDir $ do
4646
doc <- openDoc "NoteDef.hs" "haskell"
47-
waitForCustomMessage "ghcide/cradle/loaded" (const $ Just ())
47+
waitForBuildQueue
4848
waitForAllProgressDone
4949
defs <- getDefinitions doc (Position 1 0)
5050
liftIO $ defs @?= InL (Definition (InR []))
5151

5252
, testCase "unopened_file" $ runSessionWithServer def plugin testDataDir $ do
5353
doc <- openDoc "Other.hs" "haskell"
5454
waitForCustomMessage "ghcide/cradle/loaded" (const $ Just ())
55+
waitForBuildQueue
5556
waitForAllProgressDone
5657
defs <- getDefinitions doc (Position 5 20)
5758
liftIO $ do

0 commit comments

Comments
 (0)