Skip to content

Commit 2537fde

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

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

test/integration-tests/SwiftSnippet.test.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,12 @@ suite("SwiftSnippet Test Suite", function () {
6969
expect(exitCode).to.equal(0);
7070

7171
const session = await sessionPromise;
72+
let path = `${testAssetPath("defaultPackage")}/.build/debug/hello`;
73+
if (process.platform === "win32") {
74+
path = path + ".exe";
75+
}
7276
expect(session.configuration.program?.toLowerCase()).to.equal(
73-
`${testAssetPath("defaultPackage")}/.build/debug/hello`.toLocaleLowerCase() // Windows may use d:\ or D:\
77+
path.toLocaleLowerCase() // Windows may use d:\ or D:\
7478
);
7579
expect(session.configuration).to.have.property("noDebug", true);
7680
});
@@ -89,8 +93,12 @@ suite("SwiftSnippet Test Suite", function () {
8993
expect(exitCode).to.equal(0);
9094

9195
const session = await sessionPromise;
96+
let path = `${testAssetPath("defaultPackage")}/.build/debug/hello`;
97+
if (process.platform === "win32") {
98+
path = path + ".exe";
99+
}
92100
expect(session.configuration.program?.toLowerCase()).to.equal(
93-
`${testAssetPath("defaultPackage")}/.build/debug/hello`.toLocaleLowerCase() // Windows may use d:\ or D:\
101+
path.toLocaleLowerCase() // Windows may use d:\ or D:\
94102
);
95103
expect(session.configuration).to.not.have.property("noDebug");
96104
});

0 commit comments

Comments
 (0)