@@ -23,7 +23,21 @@ gotoNoteTests = testGroup "Goto Note Definition"
23
23
defs <- getDefinitions doc (Position 3 41 )
24
24
liftIO $ do
25
25
fp <- canonicalizePath " NoteDef.hs"
26
- defs @?= InL (Definition (InR [Location (filePathToUri fp) (Range (Position 5 9 ) (Position 5 9 ))]))
26
+ defs @?= InL (Definition (InR [Location (filePathToUri fp) (Range (Position 8 9 ) (Position 8 9 ))]))
27
+ , testCase " liberal_format" $ runSessionWithServer def plugin testDataDir $ do
28
+ doc <- openDoc " NoteDef.hs" " haskell"
29
+ _ <- waitForAllProgressDone
30
+ defs <- getDefinitions doc (Position 5 64 )
31
+ liftIO $ do
32
+ fp <- canonicalizePath " NoteDef.hs"
33
+ defs @?= InL (Definition (InR [Location (filePathToUri fp) (Range (Position 18 9 ) (Position 18 9 ))]))
34
+ , testCase " invalid_note" $ runSessionWithServer def plugin testDataDir $ do
35
+ doc <- openDoc " NoteDef.hs" " haskell"
36
+ _ <- waitForAllProgressDone
37
+ defs <- getDefinitions doc (Position 6 54 )
38
+ liftIO $ do
39
+ defs @?= InL (Definition (InR [] ))
40
+
27
41
, testCase " no_note" $ runSessionWithServer def plugin testDataDir $ do
28
42
doc <- openDoc " NoteDef.hs" " haskell"
29
43
defs <- getDefinitions doc (Position 1 0 )
@@ -36,7 +50,7 @@ gotoNoteTests = testGroup "Goto Note Definition"
36
50
defs <- getDefinitions doc (Position 5 20 )
37
51
liftIO $ do
38
52
fp <- canonicalizePath " NoteDef.hs"
39
- defs @?= InL (Definition (InR [Location (filePathToUri fp) (Range (Position 9 6 ) (Position 9 6 ))]))
53
+ defs @?= InL (Definition (InR [Location (filePathToUri fp) (Range (Position 12 6 ) (Position 12 6 ))]))
40
54
]
41
55
42
56
testDataDir :: FilePath
0 commit comments