mirror of https://github.com/aminya/setup-cpp
test: test all the msvc version installations
This commit is contained in:
parent
1d04cc2855
commit
73ec89a099
|
@ -1,18 +1,33 @@
|
||||||
|
import which from "which"
|
||||||
import { testBin } from "../../utils/tests/test-helpers"
|
import { testBin } from "../../utils/tests/test-helpers"
|
||||||
import { setupMSVC } from "../msvc"
|
import { setupMSVC } from "../msvc"
|
||||||
|
|
||||||
jest.setTimeout(300000)
|
jest.setTimeout(300000)
|
||||||
describe("setup-msvc", () => {
|
describe("setup-msvc", () => {
|
||||||
it("should setup msvc", async () => {
|
it("should setup msvc 2019", async () => {
|
||||||
if (process.platform !== "win32") {
|
if (process.platform !== "win32") {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
await setupMSVC("2019", "", process.arch)
|
await setupMSVC("2019", "", process.arch)
|
||||||
|
await testBin("cl", [])
|
||||||
|
console.log(which("cl"))
|
||||||
|
})
|
||||||
|
|
||||||
try {
|
it("should setup msvc 2017", async () => {
|
||||||
await testBin("cl", [])
|
if (process.platform !== "win32") {
|
||||||
} catch (err) {
|
return
|
||||||
// TODO see #1
|
|
||||||
}
|
}
|
||||||
|
await setupMSVC("2017", "", process.arch)
|
||||||
|
await testBin("cl", [])
|
||||||
|
console.log(which("cl"))
|
||||||
|
})
|
||||||
|
|
||||||
|
it("should setup msvc 2015", async () => {
|
||||||
|
if (process.platform !== "win32") {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
await setupMSVC("2015", "", process.arch)
|
||||||
|
await testBin("cl", [])
|
||||||
|
console.log(which("cl"))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue