Skip to content

Commit 25adbbf

Browse files
committed
Add tests showing wrong handling of textDocument/foldingRange
1 parent 6069be5 commit 25adbbf

File tree

4 files changed

+22
-1
lines changed

4 files changed

+22
-1
lines changed

test/Lsp.Tests/Capabilities/Client/ClientCapabilitiesTests.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,13 @@ public void SimpleTest(string expected)
6161
WillSave = true,
6262
DidSave = true,
6363
WillSaveWaitUntil = true
64+
},
65+
FoldingRangeProvider = new FoldingRangeCapability() {
66+
DynamicRegistration = true,
67+
LineFoldingOnly = true,
68+
RangeLimit = 5000
6469
}
70+
6571
},
6672
Workspace = new WorkspaceClientCapabilities() {
6773
ApplyEdit = true,

test/Lsp.Tests/Capabilities/Client/ClientCapabilitiesTests_$SimpleTest.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@
8686
"implementation": {
8787
"linkSupport": true,
8888
"dynamicRegistration": true
89+
},
90+
"foldingRange": {
91+
"dynamicRegistration": true,
92+
"rangeLimit": 5000,
93+
"lineFoldingOnly": true
8994
}
9095
},
9196
"experimental": {

test/Lsp.Tests/Models/InitializeParamsTests.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ public void SimpleTest(string expected)
5050
WillSave = true,
5151
DidSave = true,
5252
WillSaveWaitUntil = true
53+
},
54+
FoldingRangeProvider = new FoldingRangeCapability {
55+
DynamicRegistration = true,
56+
LineFoldingOnly = true,
57+
RangeLimit = 500,
5358
}
5459
},
5560
Workspace = new WorkspaceClientCapabilities() {

test/Lsp.Tests/Models/InitializeParamsTests_$SimpleTest.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,12 @@
7676
"rename": {
7777
"prepareSupport": false,
7878
"dynamicRegistration": true
79-
}
79+
},
80+
"foldingRange": {
81+
"dynamicRegistration": true,
82+
"rangeLimit": 5000,
83+
"lineFoldingOnly": true
84+
},
8085
},
8186
"experimental": {
8287
"abc": "test"

0 commit comments

Comments
 (0)