123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676 |
- 'use strict'
- const test = require('tap').test
- const fs = require('fs')
- const path = require('path')
- const findVisualStudio = require('../lib/find-visualstudio')
- const VisualStudioFinder = findVisualStudio.test.VisualStudioFinder
- const semverV1 = { major: 1, minor: 0, patch: 0 }
- delete process.env.VCINSTALLDIR
- function poison (object, property) {
- function fail () {
- console.error(Error(`Property ${property} should not have been accessed.`))
- process.abort()
- }
- var descriptor = {
- configurable: false,
- enumerable: false,
- get: fail,
- set: fail
- }
- Object.defineProperty(object, property, descriptor)
- }
- function TestVisualStudioFinder () { VisualStudioFinder.apply(this, arguments) }
- TestVisualStudioFinder.prototype = Object.create(VisualStudioFinder.prototype)
- // Silence npmlog - remove for debugging
- TestVisualStudioFinder.prototype.log = {
- silly: () => {},
- verbose: () => {},
- info: () => {},
- warn: () => {},
- error: () => {}
- }
- test('VS2013', function (t) {
- t.plan(4)
- const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info, {
- msBuild: 'C:\\MSBuild12\\MSBuild.exe',
- path: 'C:\\VS2013',
- sdk: null,
- toolset: 'v120',
- version: '12.0',
- versionMajor: 12,
- versionMinor: 0,
- versionYear: 2013
- })
- })
- finder.findVisualStudio2017OrNewer = (cb) => {
- finder.parseData(new Error(), '', '', cb)
- }
- finder.regSearchKeys = (keys, value, addOpts, cb) => {
- for (var i = 0; i < keys.length; ++i) {
- const fullName = `${keys[i]}\\${value}`
- switch (fullName) {
- case 'HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0':
- case 'HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0':
- continue
- case 'HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7\\12.0':
- t.pass(`expected search for registry value ${fullName}`)
- return cb(null, 'C:\\VS2013\\VC\\')
- case 'HKLM\\Software\\Microsoft\\MSBuild\\ToolsVersions\\12.0\\MSBuildToolsPath':
- t.pass(`expected search for registry value ${fullName}`)
- return cb(null, 'C:\\MSBuild12\\')
- default:
- t.fail(`unexpected search for registry value ${fullName}`)
- }
- }
- return cb(new Error())
- }
- finder.findVisualStudio()
- })
- test('VS2013 should not be found on new node versions', function (t) {
- t.plan(2)
- const finder = new TestVisualStudioFinder({
- major: 10,
- minor: 0,
- patch: 0
- }, null, (err, info) => {
- t.ok(/find .* Visual Studio/i.test(err), 'expect error')
- t.false(info, 'no data')
- })
- finder.findVisualStudio2017OrNewer = (cb) => {
- const file = path.join(__dirname, 'fixtures', 'VS_2017_Unusable.txt')
- const data = fs.readFileSync(file)
- finder.parseData(null, data, '', cb)
- }
- finder.regSearchKeys = (keys, value, addOpts, cb) => {
- for (var i = 0; i < keys.length; ++i) {
- const fullName = `${keys[i]}\\${value}`
- switch (fullName) {
- case 'HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0':
- case 'HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0':
- continue
- default:
- t.fail(`unexpected search for registry value ${fullName}`)
- }
- }
- return cb(new Error())
- }
- finder.findVisualStudio()
- })
- test('VS2015', function (t) {
- t.plan(4)
- const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info, {
- msBuild: 'C:\\MSBuild14\\MSBuild.exe',
- path: 'C:\\VS2015',
- sdk: null,
- toolset: 'v140',
- version: '14.0',
- versionMajor: 14,
- versionMinor: 0,
- versionYear: 2015
- })
- })
- finder.findVisualStudio2017OrNewer = (cb) => {
- finder.parseData(new Error(), '', '', cb)
- }
- finder.regSearchKeys = (keys, value, addOpts, cb) => {
- for (var i = 0; i < keys.length; ++i) {
- const fullName = `${keys[i]}\\${value}`
- switch (fullName) {
- case 'HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0':
- t.pass(`expected search for registry value ${fullName}`)
- return cb(null, 'C:\\VS2015\\VC\\')
- case 'HKLM\\Software\\Microsoft\\MSBuild\\ToolsVersions\\14.0\\MSBuildToolsPath':
- t.pass(`expected search for registry value ${fullName}`)
- return cb(null, 'C:\\MSBuild14\\')
- default:
- t.fail(`unexpected search for registry value ${fullName}`)
- }
- }
- return cb(new Error())
- }
- finder.findVisualStudio()
- })
- test('error from PowerShell', function (t) {
- t.plan(2)
- const finder = new TestVisualStudioFinder(semverV1, null, null)
- finder.parseData(new Error(), '', '', (info) => {
- t.ok(/use PowerShell/i.test(finder.errorLog[0]), 'expect error')
- t.false(info, 'no data')
- })
- })
- test('empty output from PowerShell', function (t) {
- t.plan(2)
- const finder = new TestVisualStudioFinder(semverV1, null, null)
- finder.parseData(null, '', '', (info) => {
- t.ok(/use PowerShell/i.test(finder.errorLog[0]), 'expect error')
- t.false(info, 'no data')
- })
- })
- test('output from PowerShell not JSON', function (t) {
- t.plan(2)
- const finder = new TestVisualStudioFinder(semverV1, null, null)
- finder.parseData(null, 'AAAABBBB', '', (info) => {
- t.ok(/use PowerShell/i.test(finder.errorLog[0]), 'expect error')
- t.false(info, 'no data')
- })
- })
- test('wrong JSON from PowerShell', function (t) {
- t.plan(2)
- const finder = new TestVisualStudioFinder(semverV1, null, null)
- finder.parseData(null, '{}', '', (info) => {
- t.ok(/use PowerShell/i.test(finder.errorLog[0]), 'expect error')
- t.false(info, 'no data')
- })
- })
- test('empty JSON from PowerShell', function (t) {
- t.plan(2)
- const finder = new TestVisualStudioFinder(semverV1, null, null)
- finder.parseData(null, '[]', '', (info) => {
- t.ok(/find .* Visual Studio/i.test(finder.errorLog[0]), 'expect error')
- t.false(info, 'no data')
- })
- })
- test('future version', function (t) {
- t.plan(3)
- const finder = new TestVisualStudioFinder(semverV1, null, null)
- finder.parseData(null, JSON.stringify([{
- packages: [
- 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64',
- 'Microsoft.VisualStudio.Component.Windows10SDK.17763',
- 'Microsoft.VisualStudio.VC.MSBuild.Base'
- ],
- path: 'C:\\VS',
- version: '9999.9999.9999.9999'
- }]), '', (info) => {
- t.ok(/unknown version/i.test(finder.errorLog[0]), 'expect error')
- t.ok(/find .* Visual Studio/i.test(finder.errorLog[1]), 'expect error')
- t.false(info, 'no data')
- })
- })
- test('single unusable VS2017', function (t) {
- t.plan(3)
- const finder = new TestVisualStudioFinder(semverV1, null, null)
- const file = path.join(__dirname, 'fixtures', 'VS_2017_Unusable.txt')
- const data = fs.readFileSync(file)
- finder.parseData(null, data, '', (info) => {
- t.ok(/checking/i.test(finder.errorLog[0]), 'expect error')
- t.ok(/find .* Visual Studio/i.test(finder.errorLog[2]), 'expect error')
- t.false(info, 'no data')
- })
- })
- test('minimal VS2017 Build Tools', function (t) {
- t.plan(2)
- const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info, {
- msBuild: 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\' +
- 'BuildTools\\MSBuild\\15.0\\Bin\\MSBuild.exe',
- path:
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools',
- sdk: '10.0.17134.0',
- toolset: 'v141',
- version: '15.9.28307.665',
- versionMajor: 15,
- versionMinor: 9,
- versionYear: 2017
- })
- })
- poison(finder, 'regSearchKeys')
- finder.findVisualStudio2017OrNewer = (cb) => {
- const file = path.join(__dirname, 'fixtures',
- 'VS_2017_BuildTools_minimal.txt')
- const data = fs.readFileSync(file)
- finder.parseData(null, data, '', cb)
- }
- finder.findVisualStudio()
- })
- test('VS2017 Community with C++ workload', function (t) {
- t.plan(2)
- const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info, {
- msBuild: 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\' +
- 'Community\\MSBuild\\15.0\\Bin\\MSBuild.exe',
- path:
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community',
- sdk: '10.0.17763.0',
- toolset: 'v141',
- version: '15.9.28307.665',
- versionMajor: 15,
- versionMinor: 9,
- versionYear: 2017
- })
- })
- poison(finder, 'regSearchKeys')
- finder.findVisualStudio2017OrNewer = (cb) => {
- const file = path.join(__dirname, 'fixtures',
- 'VS_2017_Community_workload.txt')
- const data = fs.readFileSync(file)
- finder.parseData(null, data, '', cb)
- }
- finder.findVisualStudio()
- })
- test('VS2017 Express', function (t) {
- t.plan(2)
- const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info, {
- msBuild: 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\' +
- 'WDExpress\\MSBuild\\15.0\\Bin\\MSBuild.exe',
- path:
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\WDExpress',
- sdk: '10.0.17763.0',
- toolset: 'v141',
- version: '15.9.28307.858',
- versionMajor: 15,
- versionMinor: 9,
- versionYear: 2017
- })
- })
- poison(finder, 'regSearchKeys')
- finder.findVisualStudio2017OrNewer = (cb) => {
- const file = path.join(__dirname, 'fixtures', 'VS_2017_Express.txt')
- const data = fs.readFileSync(file)
- finder.parseData(null, data, '', cb)
- }
- finder.findVisualStudio()
- })
- test('VS2019 Preview with C++ workload', function (t) {
- t.plan(2)
- const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info, {
- msBuild: 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\' +
- 'Preview\\MSBuild\\Current\\Bin\\MSBuild.exe',
- path:
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Preview',
- sdk: '10.0.17763.0',
- toolset: 'v142',
- version: '16.0.28608.199',
- versionMajor: 16,
- versionMinor: 0,
- versionYear: 2019
- })
- })
- poison(finder, 'regSearchKeys')
- finder.findVisualStudio2017OrNewer = (cb) => {
- const file = path.join(__dirname, 'fixtures',
- 'VS_2019_Preview.txt')
- const data = fs.readFileSync(file)
- finder.parseData(null, data, '', cb)
- }
- finder.findVisualStudio()
- })
- test('minimal VS2019 Build Tools', function (t) {
- t.plan(2)
- const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info, {
- msBuild: 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\' +
- 'BuildTools\\MSBuild\\Current\\Bin\\MSBuild.exe',
- path:
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools',
- sdk: '10.0.17134.0',
- toolset: 'v142',
- version: '16.1.28922.388',
- versionMajor: 16,
- versionMinor: 1,
- versionYear: 2019
- })
- })
- poison(finder, 'regSearchKeys')
- finder.findVisualStudio2017OrNewer = (cb) => {
- const file = path.join(__dirname, 'fixtures',
- 'VS_2019_BuildTools_minimal.txt')
- const data = fs.readFileSync(file)
- finder.parseData(null, data, '', cb)
- }
- finder.findVisualStudio()
- })
- test('VS2019 Community with C++ workload', function (t) {
- t.plan(2)
- const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info, {
- msBuild: 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\' +
- 'Community\\MSBuild\\Current\\Bin\\MSBuild.exe',
- path:
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community',
- sdk: '10.0.17763.0',
- toolset: 'v142',
- version: '16.1.28922.388',
- versionMajor: 16,
- versionMinor: 1,
- versionYear: 2019
- })
- })
- poison(finder, 'regSearchKeys')
- finder.findVisualStudio2017OrNewer = (cb) => {
- const file = path.join(__dirname, 'fixtures',
- 'VS_2019_Community_workload.txt')
- const data = fs.readFileSync(file)
- finder.parseData(null, data, '', cb)
- }
- finder.findVisualStudio()
- })
- function allVsVersions (t, finder) {
- finder.findVisualStudio2017OrNewer = (cb) => {
- const data0 = JSON.parse(fs.readFileSync(path.join(__dirname, 'fixtures',
- 'VS_2017_Unusable.txt')))
- const data1 = JSON.parse(fs.readFileSync(path.join(__dirname, 'fixtures',
- 'VS_2017_BuildTools_minimal.txt')))
- const data2 = JSON.parse(fs.readFileSync(path.join(__dirname, 'fixtures',
- 'VS_2017_Community_workload.txt')))
- const data3 = JSON.parse(fs.readFileSync(path.join(__dirname, 'fixtures',
- 'VS_2017_Express.txt')))
- const data4 = JSON.parse(fs.readFileSync(path.join(__dirname, 'fixtures',
- 'VS_2019_Preview.txt')))
- const data5 = JSON.parse(fs.readFileSync(path.join(__dirname, 'fixtures',
- 'VS_2019_BuildTools_minimal.txt')))
- const data6 = JSON.parse(fs.readFileSync(path.join(__dirname, 'fixtures',
- 'VS_2019_Community_workload.txt')))
- const data = JSON.stringify(data0.concat(data1, data2, data3, data4,
- data5, data6))
- finder.parseData(null, data, '', cb)
- }
- finder.regSearchKeys = (keys, value, addOpts, cb) => {
- for (var i = 0; i < keys.length; ++i) {
- const fullName = `${keys[i]}\\${value}`
- switch (fullName) {
- case 'HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0':
- case 'HKLM\\Software\\Microsoft\\VisualStudio\\SxS\\VC7\\12.0':
- continue
- case 'HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\12.0':
- return cb(null, 'C:\\VS2013\\VC\\')
- case 'HKLM\\Software\\Microsoft\\MSBuild\\ToolsVersions\\12.0\\MSBuildToolsPath':
- return cb(null, 'C:\\MSBuild12\\')
- case 'HKLM\\Software\\Wow6432Node\\Microsoft\\VisualStudio\\SxS\\VC7\\14.0':
- return cb(null, 'C:\\VS2015\\VC\\')
- case 'HKLM\\Software\\Microsoft\\MSBuild\\ToolsVersions\\14.0\\MSBuildToolsPath':
- return cb(null, 'C:\\MSBuild14\\')
- default:
- t.fail(`unexpected search for registry value ${fullName}`)
- }
- }
- return cb(new Error())
- }
- }
- test('fail when looking for invalid path', function (t) {
- t.plan(2)
- const finder = new TestVisualStudioFinder(semverV1, 'AABB', (err, info) => {
- t.ok(/find .* Visual Studio/i.test(err), 'expect error')
- t.false(info, 'no data')
- })
- allVsVersions(t, finder)
- finder.findVisualStudio()
- })
- test('look for VS2013 by version number', function (t) {
- t.plan(2)
- const finder = new TestVisualStudioFinder(semverV1, '2013', (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info.versionYear, 2013)
- })
- allVsVersions(t, finder)
- finder.findVisualStudio()
- })
- test('look for VS2013 by installation path', function (t) {
- t.plan(2)
- const finder = new TestVisualStudioFinder(semverV1, 'C:\\VS2013',
- (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info.path, 'C:\\VS2013')
- })
- allVsVersions(t, finder)
- finder.findVisualStudio()
- })
- test('look for VS2015 by version number', function (t) {
- t.plan(2)
- const finder = new TestVisualStudioFinder(semverV1, '2015', (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info.versionYear, 2015)
- })
- allVsVersions(t, finder)
- finder.findVisualStudio()
- })
- test('look for VS2015 by installation path', function (t) {
- t.plan(2)
- const finder = new TestVisualStudioFinder(semverV1, 'C:\\VS2015',
- (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info.path, 'C:\\VS2015')
- })
- allVsVersions(t, finder)
- finder.findVisualStudio()
- })
- test('look for VS2017 by version number', function (t) {
- t.plan(2)
- const finder = new TestVisualStudioFinder(semverV1, '2017', (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info.versionYear, 2017)
- })
- allVsVersions(t, finder)
- finder.findVisualStudio()
- })
- test('look for VS2017 by installation path', function (t) {
- t.plan(2)
- const finder = new TestVisualStudioFinder(semverV1,
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community',
- (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info.path,
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community')
- })
- allVsVersions(t, finder)
- finder.findVisualStudio()
- })
- test('look for VS2019 by version number', function (t) {
- t.plan(2)
- const finder = new TestVisualStudioFinder(semverV1, '2019', (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info.versionYear, 2019)
- })
- allVsVersions(t, finder)
- finder.findVisualStudio()
- })
- test('look for VS2019 by installation path', function (t) {
- t.plan(2)
- const finder = new TestVisualStudioFinder(semverV1,
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools',
- (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info.path,
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools')
- })
- allVsVersions(t, finder)
- finder.findVisualStudio()
- })
- test('msvs_version match should be case insensitive', function (t) {
- t.plan(2)
- const finder = new TestVisualStudioFinder(semverV1,
- 'c:\\program files (x86)\\microsoft visual studio\\2019\\BUILDTOOLS',
- (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info.path,
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools')
- })
- allVsVersions(t, finder)
- finder.findVisualStudio()
- })
- test('latest version should be found by default', function (t) {
- t.plan(2)
- const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info.versionYear, 2019)
- })
- allVsVersions(t, finder)
- finder.findVisualStudio()
- })
- test('run on a usable VS Command Prompt', function (t) {
- t.plan(2)
- process.env.VCINSTALLDIR = 'C:\\VS2015\\VC'
- // VSINSTALLDIR is not defined on Visual C++ Build Tools 2015
- delete process.env.VSINSTALLDIR
- const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info.path, 'C:\\VS2015')
- })
- allVsVersions(t, finder)
- finder.findVisualStudio()
- })
- test('VCINSTALLDIR match should be case insensitive', function (t) {
- t.plan(2)
- process.env.VCINSTALLDIR =
- 'c:\\program files (x86)\\microsoft visual studio\\2019\\BUILDTOOLS\\VC'
- const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info.path,
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools')
- })
- allVsVersions(t, finder)
- finder.findVisualStudio()
- })
- test('run on a unusable VS Command Prompt', function (t) {
- t.plan(2)
- process.env.VCINSTALLDIR =
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildToolsUnusable\\VC'
- const finder = new TestVisualStudioFinder(semverV1, null, (err, info) => {
- t.ok(/find .* Visual Studio/i.test(err), 'expect error')
- t.false(info, 'no data')
- })
- allVsVersions(t, finder)
- finder.findVisualStudio()
- })
- test('run on a VS Command Prompt with matching msvs_version', function (t) {
- t.plan(2)
- process.env.VCINSTALLDIR = 'C:\\VS2015\\VC'
- const finder = new TestVisualStudioFinder(semverV1, 'C:\\VS2015',
- (err, info) => {
- t.strictEqual(err, null)
- t.deepEqual(info.path, 'C:\\VS2015')
- })
- allVsVersions(t, finder)
- finder.findVisualStudio()
- })
- test('run on a VS Command Prompt with mismatched msvs_version', function (t) {
- t.plan(2)
- process.env.VCINSTALLDIR =
- 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC'
- const finder = new TestVisualStudioFinder(semverV1, 'C:\\VS2015',
- (err, info) => {
- t.ok(/find .* Visual Studio/i.test(err), 'expect error')
- t.false(info, 'no data')
- })
- allVsVersions(t, finder)
- finder.findVisualStudio()
- })
|