Skip to content

Commit 51f6c74

Browse files
author
automatic-merge
committed
Merge remote branch 'origin/master' into edge
2 parents ee5d4aa + 03266f8 commit 51f6c74

File tree

6 files changed

+186
-2
lines changed

6 files changed

+186
-2
lines changed

.vscode/launch.json

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
// So you can checkout a second copy of the ALS repository under
3535
// ../als-rt and use it with the following line.
3636
// "${workspaceFolder}/../als-rt"
37+
// "${workspaceFolder}/integration/vscode/ada/test/TestWorkspace"
3738
],
3839
"preLaunchTask": "npm: compile",
3940
"env": {
@@ -46,7 +47,40 @@
4647
}
4748
},
4849
{
49-
"name": "Highlighting Tests (Update Test Refs)",
50+
"name": "Extension Tests",
51+
"type": "extensionHost",
52+
"request": "launch",
53+
"runtimeExecutable": "${execPath}",
54+
"outFiles": [
55+
"${workspaceFolder}/integration/vscode/ada/out/**/*.js",
56+
"!**/node_modules/**"
57+
],
58+
"args": [
59+
"--extensionDevelopmentPath=${workspaceFolder}/integration/vscode/ada",
60+
"--extensionTestsPath=${workspaceFolder}/integration/vscode/ada/out/test/suite/index",
61+
"${workspaceFolder}/integration/vscode/ada/test/TestWorkspace"
62+
],
63+
// Below we make the executables of node modules visible to the tests.
64+
// In particular, vscode-tmgrammar-snap is used for syntax highlighting
65+
// tests.
66+
"env": {
67+
// This is necessary to make the "child" vscode inherit the PATH
68+
// variable set in the workspace settings. Without it in some setups
69+
// (e.g. vscode remote) the child vscode does not get visibility
70+
// over the Ada toolchain available in the parent vscode
71+
// environment.
72+
"PATH": "${env:PATH}",
73+
// This is custom env var that we use in
74+
// integration/vscode/ada/test/suite/index.ts to prevent timeouts in
75+
// tests when debugging
76+
"MOCHA_TIMEOUT": "0"
77+
},
78+
"preLaunchTask": "npm: pretest",
79+
// Switch to Debug Console to see test results
80+
"internalConsoleOptions": "openOnSessionStart"
81+
},
82+
{
83+
"name": "Extension Tests (Update Test Refs)",
5084
"type": "extensionHost",
5185
"request": "launch",
5286
"runtimeExecutable": "${execPath}",
@@ -102,7 +136,7 @@
102136
],
103137
"args": [
104138
"--extensionDevelopmentPath=${workspaceFolder}/integration/vscode/ada",
105-
"--extensionTestsPath=${workspaceFolder}/integration/vscode/ada/out/test/suite/highlighting/index",
139+
"--extensionTestsPath=${workspaceFolder}/integration/vscode/ada/out/test/suite/index",
106140
"${workspaceFolder}/integration/vscode/ada/test/TestWorkspace"
107141
],
108142
// Below we make the executables of node modules visible to the tests.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
-- Check that only marked subprograms get highlighted as obsolescent. In
2+
-- particular, there was a LAL bug that made the pragmas impact the enclosing
3+
-- package, so this test should check that the parent package does not get
4+
-- marked as obsolescent.
5+
package Pkg_With_Obsolescent_Members is
6+
7+
procedure Proc1;
8+
pragma Obsolescent;
9+
10+
procedure Proc2;
11+
-- Not obsolescent
12+
13+
procedure Proc3;
14+
pragma Obsolescent;
15+
16+
end Pkg_With_Obsolescent_Members;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
line 5: column 9 - 36: namespace [declaration] : Pkg_With_Obsolescent_Members
2+
line 7: column 14 - 18: function [declaration, deprecated] : Proc1
3+
line 10: column 14 - 18: function [declaration] : Proc2
4+
line 13: column 14 - 18: function [declaration, deprecated] : Proc3
5+
line 16: column 5 - 32: namespace : Pkg_With_Obsolescent_Members
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
>-- Check that only marked subprograms get highlighted as obsolescent. In
2+
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.ada comment.line.double-dash.ada
3+
>-- particular, there was a LAL bug that made the pragmas impact the enclosing
4+
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.ada comment.line.double-dash.ada
5+
>-- package, so this test should check that the parent package does not get
6+
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.ada comment.line.double-dash.ada
7+
>-- marked as obsolescent.
8+
#^^^^^^^^^^^^^^^^^^^^^^^^^^ source.ada comment.line.double-dash.ada
9+
>package Pkg_With_Obsolescent_Members is
10+
#^^^^^^^ source.ada meta.declaration.package.specification.ada keyword.ada
11+
# ^ source.ada meta.declaration.package.specification.ada
12+
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.ada meta.declaration.package.specification.ada entity.name.package.ada
13+
# ^ source.ada meta.declaration.package.specification.ada
14+
# ^^ source.ada meta.declaration.package.specification.ada keyword.ada
15+
>
16+
> procedure Proc1;
17+
#^^^ source.ada meta.declaration.package.specification.ada
18+
# ^^^^^^^^^ source.ada meta.declaration.package.specification.ada meta.declaration.procedure.body.ada keyword.ada
19+
# ^ source.ada meta.declaration.package.specification.ada meta.declaration.procedure.body.ada
20+
# ^^^^^ source.ada meta.declaration.package.specification.ada meta.declaration.procedure.body.ada entity.name.function.ada
21+
# ^ source.ada meta.declaration.package.specification.ada meta.declaration.procedure.body.ada punctuation.ada
22+
> pragma Obsolescent;
23+
#^^^ source.ada meta.declaration.package.specification.ada
24+
# ^^^^^^ source.ada meta.declaration.package.specification.ada meta.pragma.ada keyword.ada
25+
# ^ source.ada meta.declaration.package.specification.ada meta.pragma.ada
26+
# ^^^^^^^^^^^ source.ada meta.declaration.package.specification.ada meta.pragma.ada keyword.control.directive.ada
27+
# ^ source.ada meta.declaration.package.specification.ada meta.pragma.ada punctuation.ada
28+
>
29+
> procedure Proc2;
30+
#^^^ source.ada meta.declaration.package.specification.ada
31+
# ^^^^^^^^^ source.ada meta.declaration.package.specification.ada meta.declaration.procedure.body.ada keyword.ada
32+
# ^ source.ada meta.declaration.package.specification.ada meta.declaration.procedure.body.ada
33+
# ^^^^^ source.ada meta.declaration.package.specification.ada meta.declaration.procedure.body.ada entity.name.function.ada
34+
# ^ source.ada meta.declaration.package.specification.ada meta.declaration.procedure.body.ada punctuation.ada
35+
> -- Not obsolescent
36+
#^^^ source.ada meta.declaration.package.specification.ada
37+
# ^^^^^^^^^^^^^^^^^^^ source.ada meta.declaration.package.specification.ada comment.line.double-dash.ada
38+
>
39+
> procedure Proc3;
40+
#^^^ source.ada meta.declaration.package.specification.ada
41+
# ^^^^^^^^^ source.ada meta.declaration.package.specification.ada meta.declaration.procedure.body.ada keyword.ada
42+
# ^ source.ada meta.declaration.package.specification.ada meta.declaration.procedure.body.ada
43+
# ^^^^^ source.ada meta.declaration.package.specification.ada meta.declaration.procedure.body.ada entity.name.function.ada
44+
# ^ source.ada meta.declaration.package.specification.ada meta.declaration.procedure.body.ada punctuation.ada
45+
> pragma Obsolescent;
46+
#^^^ source.ada meta.declaration.package.specification.ada
47+
# ^^^^^^ source.ada meta.declaration.package.specification.ada meta.pragma.ada keyword.ada
48+
# ^ source.ada meta.declaration.package.specification.ada meta.pragma.ada
49+
# ^^^^^^^^^^^ source.ada meta.declaration.package.specification.ada meta.pragma.ada keyword.control.directive.ada
50+
# ^ source.ada meta.declaration.package.specification.ada meta.pragma.ada punctuation.ada
51+
>
52+
>end Pkg_With_Obsolescent_Members;
53+
#^^^ source.ada meta.declaration.package.specification.ada keyword.ada
54+
# ^ source.ada meta.declaration.package.specification.ada
55+
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.ada meta.declaration.package.specification.ada entity.name.package.ada
56+
# ^ source.ada meta.declaration.package.specification.ada punctuation.ada
57+
>
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
>-- Check that only marked subprograms get highlighted as obsolescent. In
2+
#^^ source.ada comment.line.ada
3+
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.ada comment.line.ada
4+
>-- particular, there was a LAL bug that made the pragmas impact the enclosing
5+
#^^ source.ada comment.line.ada
6+
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.ada comment.line.ada
7+
>-- package, so this test should check that the parent package does not get
8+
#^^ source.ada comment.line.ada
9+
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.ada comment.line.ada
10+
>-- marked as obsolescent.
11+
#^^ source.ada comment.line.ada
12+
# ^^^^^^^^^^^^^^^^^^^^^^^^ source.ada comment.line.ada
13+
>package Pkg_With_Obsolescent_Members is
14+
#^^^^^^^ source.ada keyword.other.ada
15+
# ^ source.ada
16+
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.ada entity.name.label.ada
17+
# ^ source.ada
18+
# ^^ source.ada keyword.other.ada
19+
>
20+
> procedure Proc1;
21+
#^^^ source.ada
22+
# ^^^^^^^^^ source.ada meta.declaration.subprogram.ada keyword.other.ada
23+
# ^ source.ada meta.declaration.subprogram.ada
24+
# ^^^^^ source.ada meta.declaration.subprogram.ada entity.name.function.ada
25+
# ^ source.ada punctuation.ada
26+
> pragma Obsolescent;
27+
#^^^ source.ada
28+
# ^^^^^^ source.ada keyword.control.ada
29+
# ^ source.ada
30+
# ^^^^^^^^^^^ source.ada entity.name.label.ada
31+
# ^ source.ada punctuation.ada
32+
>
33+
> procedure Proc2;
34+
#^^^ source.ada
35+
# ^^^^^^^^^ source.ada meta.declaration.subprogram.ada keyword.other.ada
36+
# ^ source.ada meta.declaration.subprogram.ada
37+
# ^^^^^ source.ada meta.declaration.subprogram.ada entity.name.function.ada
38+
# ^ source.ada punctuation.ada
39+
> -- Not obsolescent
40+
#^^^ source.ada
41+
# ^^ source.ada comment.line.ada
42+
# ^^^^^^^^^^^^^^^^^ source.ada comment.line.ada
43+
>
44+
> procedure Proc3;
45+
#^^^ source.ada
46+
# ^^^^^^^^^ source.ada meta.declaration.subprogram.ada keyword.other.ada
47+
# ^ source.ada meta.declaration.subprogram.ada
48+
# ^^^^^ source.ada meta.declaration.subprogram.ada entity.name.function.ada
49+
# ^ source.ada punctuation.ada
50+
> pragma Obsolescent;
51+
#^^^ source.ada
52+
# ^^^^^^ source.ada keyword.control.ada
53+
# ^ source.ada
54+
# ^^^^^^^^^^^ source.ada entity.name.label.ada
55+
# ^ source.ada punctuation.ada
56+
>
57+
>end Pkg_With_Obsolescent_Members;
58+
#^^^ source.ada keyword.other.ada
59+
# ^ source.ada
60+
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.ada entity.name.label.ada
61+
# ^ source.ada punctuation.ada
62+
>

integration/vscode/ada/test/suite/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ export function run(): Promise<void> {
1616
mochaOptions.reporter = process.env.MOCHA_REPORTER;
1717
}
1818

19+
if (!mochaOptions.reporterOptions) {
20+
mochaOptions.reporterOptions = {
21+
maxDiffSize: 0,
22+
};
23+
}
24+
1925
// Create the mocha test
2026
const mocha = new Mocha(mochaOptions);
2127

@@ -35,6 +41,10 @@ export function run(): Promise<void> {
3541
mocha.timeout(env['MOCHA_TIMEOUT']);
3642
}
3743

44+
if (env['MOCHA_GREP']) {
45+
mocha.grep(env['MOCHA_GREP']);
46+
}
47+
3848
// Run the mocha test
3949
mocha.run((failures) => {
4050
if (failures > 0) {

0 commit comments

Comments
 (0)