From 2537fdee46a9ede957fdcf7841c592f3b4edf939 Mon Sep 17 00:00:00 2001 From: Adam Ward Date: Tue, 10 Dec 2024 13:32:50 -0500 Subject: [PATCH] Add .exe to expected path for windows --- test/integration-tests/SwiftSnippet.test.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/integration-tests/SwiftSnippet.test.ts b/test/integration-tests/SwiftSnippet.test.ts index 504f037b..a4d2d7db 100644 --- a/test/integration-tests/SwiftSnippet.test.ts +++ b/test/integration-tests/SwiftSnippet.test.ts @@ -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); }); @@ -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"); });