2021-09-16 16:30:47 +08:00
|
|
|
import { setupCppcheck } from "../cppcheck"
|
2021-09-16 23:15:43 +08:00
|
|
|
import { testBin } from "../../utils/tests/test-helpers"
|
2022-11-03 11:01:42 +08:00
|
|
|
import { getVersion } from "../../versions/versions"
|
2021-09-16 16:30:47 +08:00
|
|
|
|
2021-09-17 17:50:12 +08:00
|
|
|
jest.setTimeout(300000)
|
2021-09-16 16:30:47 +08:00
|
|
|
describe("setup-cppcheck", () => {
|
|
|
|
|
it("should setup cppcheck", async () => {
|
2023-08-22 14:12:00 +08:00
|
|
|
try {
|
|
|
|
|
const installInfo = await setupCppcheck(getVersion("cppcheck", undefined), "", process.arch)
|
2021-09-16 16:30:47 +08:00
|
|
|
|
2023-08-22 14:12:00 +08:00
|
|
|
await testBin("cppcheck", ["--version"], installInfo.binDir)
|
|
|
|
|
} catch (error) {
|
|
|
|
|
if (process.platform === "win32") {
|
|
|
|
|
console.error(error)
|
|
|
|
|
} else {
|
|
|
|
|
throw error
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-09-16 16:30:47 +08:00
|
|
|
})
|
|
|
|
|
})
|