Skip to content

Commit 924a518

Browse files
author
automatic-merge
committed
Merge remote branch 'origin/master' into edge
2 parents ac5e73e + 5b57e54 commit 924a518

File tree

1 file changed

+37
-41
lines changed

1 file changed

+37
-41
lines changed

integration/vscode/ada/test/suite/general/highlighting.test.ts

Lines changed: 37 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -14,57 +14,53 @@ suite('Highlighting', function () {
1414
await activate();
1515
});
1616

17-
this.afterEach(async function () {
18-
await vscode.commands.executeCommand('workbench.action.closeActiveEditor');
19-
});
20-
21-
test('file paths recovered', function () {
22-
const highlightingTestRoot = getDocUri('src/highlighting').fsPath;
23-
adaFilePaths = [];
24-
25-
function walk(dir: string) {
26-
const openDir = opendirSync(dir);
27-
try {
28-
let child;
29-
while ((child = openDir.readSync()) != null) {
30-
const childPath = path.join(dir, child.name);
31-
if (child.isDirectory()) {
32-
walk(childPath);
33-
} else if (child.isFile()) {
34-
if (child.name.match(/\.ad[bs]$/)) {
35-
adaFilePaths.push(childPath);
36-
}
17+
const highlightingTestRoot = getDocUri('src/highlighting').fsPath;
18+
adaFilePaths = [];
19+
20+
function walk(dir: string) {
21+
const openDir = opendirSync(dir);
22+
try {
23+
let child;
24+
while ((child = openDir.readSync()) != null) {
25+
const childPath = path.join(dir, child.name);
26+
if (child.isDirectory()) {
27+
walk(childPath);
28+
} else if (child.isFile()) {
29+
if (child.name.match(/\.ad[bs]$/)) {
30+
adaFilePaths.push(childPath);
3731
}
3832
}
39-
} finally {
40-
openDir.closeSync();
4133
}
34+
} finally {
35+
openDir.closeSync();
4236
}
37+
}
4338

44-
walk(highlightingTestRoot);
45-
assert.notStrictEqual(adaFilePaths, []);
46-
});
39+
walk(highlightingTestRoot);
40+
assert.notStrictEqual(adaFilePaths, []);
4741

48-
this.afterAll(function () {
49-
for (const absPath of adaFilePaths) {
50-
const testName = `${basename(dirname(absPath))}/${basename(absPath)}`;
51-
const absFileUri = vscode.Uri.file(absPath);
42+
for (const absPath of adaFilePaths) {
43+
const testName = `${basename(dirname(absPath))}/${basename(absPath)}`;
44+
const absFileUri = vscode.Uri.file(absPath);
5245

53-
suite(testName, function () {
54-
test('syntax.main', function () {
55-
testSyntaxHighlighting(absPath, 'syntaxes');
56-
});
46+
suite(testName, function () {
47+
this.afterAll(async function () {
48+
await vscode.commands.executeCommand('workbench.action.closeActiveEditor');
49+
});
5750

58-
test('syntax.advanced', function () {
59-
testSyntaxHighlighting(absPath, 'advanced');
60-
});
51+
test('syntax.main', function () {
52+
testSyntaxHighlighting(absPath, 'syntaxes');
53+
});
6154

62-
test('semantic', async function () {
63-
await testSemanticHighlighting(absFileUri);
64-
});
55+
test('syntax.advanced', function () {
56+
testSyntaxHighlighting(absPath, 'advanced');
6557
});
66-
}
67-
});
58+
59+
test('semantic', async function () {
60+
await testSemanticHighlighting(absFileUri);
61+
});
62+
});
63+
}
6864
});
6965

7066
/**

0 commit comments

Comments
 (0)