Skip to content

Commit

Permalink
ad
Browse files Browse the repository at this point in the history
  • Loading branch information
soulomoon committed May 21, 2024
1 parent 62e481a commit 6d4ba8c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions plugins/hls-notes-plugin/test/NotesTest.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,22 @@ main = defaultTestRunner $

gotoNoteTests :: TestTree
gotoNoteTests = testGroup "Goto Note Definition"
[ testCase "single_file" $ runSessionWithServer def plugin testDataDir $ do
[
testCase "single_file" $ runSessionWithServer def plugin testDataDir $ do
doc <- openDoc "NoteDef.hs" "haskell"
waitForBuildQueue
waitForAllProgressDone
defs <- getDefinitions doc (Position 3 41)
liftIO $ do
fp <- canonicalizePath "NoteDef.hs"
fp <- canonicalizePath $ testDataDir </> "NoteDef.hs"
defs @?= InL (Definition (InR [Location (filePathToUri fp) (Range (Position 8 9) (Position 8 9))]))
, testCase "liberal_format" $ runSessionWithServer def plugin testDataDir $ do
doc <- openDoc "NoteDef.hs" "haskell"
waitForBuildQueue
waitForAllProgressDone
defs <- getDefinitions doc (Position 5 64)
liftIO $ do
fp <- canonicalizePath "NoteDef.hs"
fp <- canonicalizePath $ testDataDir </> "NoteDef.hs"
defs @?= InL (Definition (InR [Location (filePathToUri fp) (Range (Position 18 11) (Position 18 11))]))

, testCase "invalid_note" $ runSessionWithServer def plugin testDataDir $ do
Expand All @@ -56,7 +57,7 @@ gotoNoteTests = testGroup "Goto Note Definition"
waitForAllProgressDone
defs <- getDefinitions doc (Position 5 20)
liftIO $ do
fp <- canonicalizePath "NoteDef.hs"
fp <- canonicalizePath $ testDataDir </> "NoteDef.hs"
defs @?= InL (Definition (InR [Location (filePathToUri fp) (Range (Position 12 6) (Position 12 6))]))
]

Expand Down

0 comments on commit 6d4ba8c

Please sign in to comment.