Skip to content

Commit c690a72

Browse files
committed
Add .exe to expected path for windows
1 parent dd37ed5 commit c690a72

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

test/integration-tests/SwiftSnippet.test.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import {
2525
import { Version } from "../../src/utilities/version";
2626
import { activateExtensionForSuite, folderInRootWorkspace } from "./utilities/testutilities";
2727
import { WorkspaceContext } from "../../src/WorkspaceContext";
28+
import { join } from "path";
2829

2930
suite("SwiftSnippet Test Suite", function () {
3031
this.timeout(120000);
@@ -69,8 +70,12 @@ suite("SwiftSnippet Test Suite", function () {
6970
expect(exitCode).to.equal(0);
7071

7172
const session = await sessionPromise;
73+
let path = join(testAssetPath("defaultPackage"), ".build", "debug", "hello");
74+
if (process.platform === "win32") {
75+
path = path + ".exe";
76+
}
7277
expect(session.configuration.program?.toLowerCase()).to.equal(
73-
`${testAssetPath("defaultPackage")}/.build/debug/hello`.toLocaleLowerCase() // Windows may use d:\ or D:\
78+
path.toLocaleLowerCase() // Windows may use d:\ or D:\
7479
);
7580
expect(session.configuration).to.have.property("noDebug", true);
7681
});
@@ -89,8 +94,12 @@ suite("SwiftSnippet Test Suite", function () {
8994
expect(exitCode).to.equal(0);
9095

9196
const session = await sessionPromise;
97+
let path = join(testAssetPath("defaultPackage"), ".build", "debug", "hello");
98+
if (process.platform === "win32") {
99+
path = path + ".exe";
100+
}
92101
expect(session.configuration.program?.toLowerCase()).to.equal(
93-
`${testAssetPath("defaultPackage")}/.build/debug/hello`.toLocaleLowerCase() // Windows may use d:\ or D:\
102+
path.toLocaleLowerCase() // Windows may use d:\ or D:\
94103
);
95104
expect(session.configuration).to.not.have.property("noDebug");
96105
});

0 commit comments

Comments
 (0)