Skip to content

Commit a6dde1b

Browse files
committed
add a test for Windows
1 parent cf58757 commit a6dde1b

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/* --------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All Rights Reserved.
3+
* See 'LICENSE' in the project root for license information.
4+
* ------------------------------------------------------------------------------------------ */
5+
import { equal } from 'assert';
6+
import { suite } from 'mocha';
7+
import * as vscode from 'vscode';
8+
import * as util from '../../../../src/common';
9+
import { isWindows } from "../../../../src/constants";
10+
11+
suite("set developer environment", () => {
12+
if (isWindows) {
13+
test("set developer environment (Windows)", async () => {
14+
const promise = vscode.commands.executeCommand('C_Cpp.SetDevEnvironment', 'test');
15+
const timer = setInterval(() => {
16+
void vscode.commands.executeCommand('workbench.action.acceptSelectedQuickOpenItem');
17+
}, 1000);
18+
await promise;
19+
clearInterval(timer);
20+
equal(util.hasMsvcEnvironment(), true, "MSVC environment not set correctly.");
21+
});
22+
} else {
23+
test("set developer environment (Linux/macOS)", () => {
24+
});
25+
}
26+
});

0 commit comments

Comments
 (0)