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 c690a72
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions test/integration-tests/SwiftSnippet.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
import { Version } from "../../src/utilities/version";
import { activateExtensionForSuite, folderInRootWorkspace } from "./utilities/testutilities";
import { WorkspaceContext } from "../../src/WorkspaceContext";
import { join } from "path";

suite("SwiftSnippet Test Suite", function () {
this.timeout(120000);
Expand Down Expand Up @@ -69,8 +70,12 @@ suite("SwiftSnippet Test Suite", function () {
expect(exitCode).to.equal(0);

const session = await sessionPromise;
let path = join(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 +94,12 @@ suite("SwiftSnippet Test Suite", function () {
expect(exitCode).to.equal(0);

const session = await sessionPromise;
let path = join(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 c690a72

Please sign in to comment.