File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,21 @@ defAndTypeDefSharedTests message params =
119
119
]
120
120
expectedResult @=? result
121
121
122
+ , testCase " preserves link-specific data when merging link and location responses (with link support)" $ do
123
+ let pluginResponses :: NonEmpty (Definition |? ([DefinitionLink ] |? Null ))
124
+ pluginResponses =
125
+ (InL . Definition . InL . Location testFileUri $ range1) :|
126
+ [ InR . InL $ [ DefinitionLink $ LocationLink (Just range1) testFileUri range2 range3 ] ]
127
+
128
+ result = combineResponses message def supportsLinkInAllDefinitionCaps params pluginResponses
129
+
130
+ expectedResult :: Definition |? ([DefinitionLink ] |? Null )
131
+ expectedResult = InR . InL $
132
+ [ DefinitionLink $ LocationLink Nothing testFileUri range1 range1
133
+ , DefinitionLink $ LocationLink (Just range1) testFileUri range2 range3
134
+ ]
135
+ expectedResult @=? result
136
+
122
137
, testCase " ignores Null responses when other responses are available" $ do
123
138
let pluginResponses :: NonEmpty (Definition |? ([DefinitionLink ] |? Null ))
124
139
pluginResponses =
You can’t perform that action at this time.
0 commit comments