Skip to content

Commit cf1d66c

Browse files
Merge branch 'topic/stab_test_win' into 'master'
Use 'type' command to dump compiler messages on Windows See merge request eng/ide/ada_language_server!2068
2 parents c3ebab7 + e542843 commit cf1d66c

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

integration/vscode/ada/test/general/tasks.test.ts

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,12 @@ ada: Run main - src/test.adb - .${path.sep}obj${path.sep}test${exe}
276276
const prov = createAdaTaskProvider();
277277

278278
/**
279-
* Build a project containing a main with style issues, warning and errors.
279+
* Run a task that dumps some compiler messages contained in the 'compiler_messages.txt' file.
280+
* This emulates a build with compiler messages.
280281
*/
281282
const def: SimpleTaskDef = {
282283
type: 'ada',
283-
command: 'cat',
284+
command: process.platform == 'win32' ? 'type' : 'cat',
284285
args: ['main_with_problem' + path.sep + 'compiler_messages.txt'],
285286
};
286287
const task = new vscode.Task(
@@ -306,18 +307,16 @@ ada: Run main - src/test.adb - .${path.sep}obj${path.sep}test${exe}
306307
.filter((diag) => ['ada'].includes(diag.source ?? ''));
307308

308309
assert.equal(
309-
alsDiagnostics
310-
.map((d) => `${d.severity}: ${d.message.split('[')[0].trim()}`)
311-
.join('\n'),
310+
alsDiagnostics.map((d) => `${d.severity}: ${d.message}`).join('\n'),
312311
`
313-
1: procedure "Hello" is not referenced
314-
1: bad casing of "Hello" declared at line 4
315-
1: bad casing of "Hello" declared at line 4
316-
1: incorrect layout
317-
1: "begin" in wrong column, should be in column 1
318-
1: bad indentation
319-
1: possibly useless assignment to "X", value might not be referenced
320-
1: "X" may be referenced before it has a value
312+
1: procedure "Hello" is not referenced [-gnatwu]
313+
1: bad casing of "Hello" declared at line 4 [-gnatyr]
314+
1: bad casing of "Hello" declared at line 4 [-gnatyr]
315+
1: incorrect layout [-gnatyl]
316+
1: "begin" in wrong column, should be in column 1 [-gnatyl]
317+
1: bad indentation [-gnaty0]
318+
1: possibly useless assignment to "X", value might not be referenced [-gnatwm]
319+
1: "X" may be referenced before it has a value [enabled by default]
321320
1: this is a low warning
322321
0: missing ";"
323322
2: this is an extra message

0 commit comments

Comments
 (0)