Skip to content

Commit

Permalink
Add .exe to expected path for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
award999 committed Dec 10, 2024
1 parent dd37ed5 commit 2537fde
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions test/integration-tests/SwiftSnippet.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,12 @@ suite("SwiftSnippet Test Suite", function () {
expect(exitCode).to.equal(0);

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

const session = await sessionPromise;
let path = `${testAssetPath("defaultPackage")}/.build/debug/hello`;
if (process.platform === "win32") {
path = path + ".exe";
}
expect(session.configuration.program?.toLowerCase()).to.equal(
`${testAssetPath("defaultPackage")}/.build/debug/hello`.toLocaleLowerCase() // Windows may use d:\ or D:\
path.toLocaleLowerCase() // Windows may use d:\ or D:\
);
expect(session.configuration).to.not.have.property("noDebug");
});
Expand Down

0 comments on commit 2537fde

Please sign in to comment.