Files
ycode/scripts/omp-bundled-path-regression.ts
T

12 lines
536 B
TypeScript

import assert from 'node:assert/strict'
import { normalize } from 'node:path'
import { detectOmpPath } from '../src/main/omp'
delete process.env['YCODE_OMP_PATH']
const detected = detectOmpPath()
assert.ok(detected, 'bundled OMP must be detected without YCODE_OMP_PATH')
const expected = normalize('resources/omp/omp.exe')
assert.ok(normalize(detected).toLowerCase().endsWith(expected.toLowerCase()),
`detected OMP must resolve to the bundled resources/omp/omp.exe, got ${detected}`)
console.log(`PASS detectOmpPath => ${detected}`)