From cbea9ec16bf2469812ce28558e6d8dfc360db014 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Sat, 29 Jan 2022 12:47:02 -0800 Subject: [PATCH] test: check CXX and CC variables in the tests --- src/gcc/__tests__/gcc.test.ts | 3 +++ src/llvm/__tests__/llvm.test.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/gcc/__tests__/gcc.test.ts b/src/gcc/__tests__/gcc.test.ts index ff57ea2b..d3eba8e2 100644 --- a/src/gcc/__tests__/gcc.test.ts +++ b/src/gcc/__tests__/gcc.test.ts @@ -13,5 +13,8 @@ describe("setup-gcc", () => { gpp = `g++-${version}` } await testBin(gpp, ["--version"], installInfo?.binDir) + + expect(process.env.CC?.includes("gcc")).toBeTruthy() + expect(process.env.CXX?.includes("g++")).toBeTruthy() }) }) diff --git a/src/llvm/__tests__/llvm.test.ts b/src/llvm/__tests__/llvm.test.ts index 613814cc..02ca22c0 100644 --- a/src/llvm/__tests__/llvm.test.ts +++ b/src/llvm/__tests__/llvm.test.ts @@ -44,6 +44,9 @@ describe("setup-llvm", () => { it("should setup LLVM", async () => { const { binDir } = await setupLLVM("11.0.0", directory, "") await testBin("clang++", ["--version"], binDir) + + expect(process.env.CC?.includes("clang")).toBeTruthy() + expect(process.env.CXX?.includes("clang++")).toBeTruthy() }) afterAll(async () => {