Skip to content

Commit 76b712a

Browse files
Adapt tests to new GPR2 behavior
For eng/ide/ada_language_server#1652
1 parent 6e3952d commit 76b712a

File tree

1 file changed

+20
-54
lines changed
  • testsuite/ada_lsp/Did_Rename_Files.context_corruption

1 file changed

+20
-54
lines changed

Diff for: testsuite/ada_lsp/Did_Rename_Files.context_corruption/test.json

+20-54
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22
{
33
"comment": [
44
"Test the context after a DidRenameFiles notification. ",
5-
"The references requests should work before and after."
5+
"The references requests should work before and after.",
6+
"If the unit name does not match teh source name (which is ",
7+
"usually the case after renaming sources outside of the ALS), ",
8+
"references are expected to be unaccurate: these units are now ",
9+
"ignored by GPR2. The user should make sure unit and source names ",
10+
"always match, and reload the project once it's the case."
611
]
712
},
813
{
914
"start": {
10-
"cmd": [
11-
"${ALS}"
12-
]
15+
"cmd": ["${ALS}"]
1316
}
1417
},
1518
{
@@ -26,9 +29,7 @@
2629
"applyEdit": true,
2730
"workspaceEdit": {
2831
"documentChanges": true,
29-
"resourceOperations": [
30-
"rename"
31-
]
32+
"resourceOperations": ["rename"]
3233
},
3334
"fileOperations": {
3435
"didRename": true
@@ -40,15 +41,9 @@
4041
"dynamicRegistration": true,
4142
"completionItem": {
4243
"snippetSupport": false,
43-
"documentationFormat": [
44-
"plaintext",
45-
"markdown"
46-
],
44+
"documentationFormat": ["plaintext", "markdown"],
4745
"resolveSupport": {
48-
"properties": [
49-
"detail",
50-
"documentation"
51-
]
46+
"properties": ["detail", "documentation"]
5247
}
5348
}
5449
},
@@ -75,9 +70,7 @@
7570
}
7671
},
7772
"experimental": {
78-
"advanced_refactorings": [
79-
"add_parameter"
80-
]
73+
"advanced_refactorings": ["add_parameter"]
8174
}
8275
}
8376
}
@@ -89,12 +82,7 @@
8982
"capabilities": {
9083
"textDocumentSync": 2,
9184
"completionProvider": {
92-
"triggerCharacters": [
93-
".",
94-
",",
95-
"'",
96-
"("
97-
],
85+
"triggerCharacters": [".", ",", "'", "("],
9886
"resolveProvider": true
9987
},
10088
"renameProvider": {
@@ -207,9 +195,7 @@
207195
"character": 14
208196
}
209197
},
210-
"alsKind": [
211-
"reference"
212-
]
198+
"alsKind": ["reference"]
213199
},
214200
{
215201
"uri": "$URI{main.adb}",
@@ -223,9 +209,7 @@
223209
"character": 13
224210
}
225211
},
226-
"alsKind": [
227-
"call"
228-
]
212+
"alsKind": ["call"]
229213
}
230214
]
231215
}
@@ -641,11 +625,11 @@
641625
}
642626
},
643627
{
644-
"shell": [
645-
"mv",
646-
"${DIR}${DIR_SEP}foo-bar1.ads",
647-
"${DIR}${DIR_SEP}foo-bar2.ads"
648-
]
628+
"shell": [
629+
"mv",
630+
"${DIR}${DIR_SEP}foo-bar1.ads",
631+
"${DIR}${DIR_SEP}foo-bar2.ads"
632+
]
649633
},
650634
{
651635
"send": {
@@ -699,25 +683,7 @@
699683
"character": 14
700684
}
701685
},
702-
"alsKind": [
703-
"reference"
704-
]
705-
},
706-
{
707-
"uri": "$URI{main.adb}",
708-
"range": {
709-
"start": {
710-
"line": 4,
711-
"character": 12
712-
},
713-
"end": {
714-
"line": 4,
715-
"character": 13
716-
}
717-
},
718-
"alsKind": [
719-
"call"
720-
]
686+
"alsKind": ["reference"]
721687
}
722688
]
723689
}

0 commit comments

Comments
 (0)