@@ -525,7 +525,7 @@ test('look for VS2019 by version number', function (t) {
525525 finder . findVisualStudio ( )
526526} )
527527
528- test ( 'look for VS2017 by installation path' , function ( t ) {
528+ test ( 'look for VS2019 by installation path' , function ( t ) {
529529 t . plan ( 2 )
530530
531531 const finder = new TestVisualStudioFinder ( semverV1 ,
@@ -540,6 +540,21 @@ test('look for VS2017 by installation path', function (t) {
540540 finder . findVisualStudio ( )
541541} )
542542
543+ test ( 'msvs_version match should be case insensitive' , function ( t ) {
544+ t . plan ( 2 )
545+
546+ const finder = new TestVisualStudioFinder ( semverV1 ,
547+ 'c:\\program files (x86)\\microsoft visual studio\\2019\\BUILDTOOLS' ,
548+ ( err , info ) => {
549+ t . strictEqual ( err , null )
550+ t . deepEqual ( info . path ,
551+ 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools' )
552+ } )
553+
554+ allVsVersions ( t , finder )
555+ finder . findVisualStudio ( )
556+ } )
557+
543558test ( 'latest version should be found by default' , function ( t ) {
544559 t . plan ( 2 )
545560
@@ -568,6 +583,22 @@ test('run on a usable VS Command Prompt', function (t) {
568583 finder . findVisualStudio ( )
569584} )
570585
586+ test ( 'VCINSTALLDIR match should be case insensitive' , function ( t ) {
587+ t . plan ( 2 )
588+
589+ process . env . VCINSTALLDIR =
590+ 'c:\\program files (x86)\\microsoft visual studio\\2019\\BUILDTOOLS\\VC'
591+
592+ const finder = new TestVisualStudioFinder ( semverV1 , null , ( err , info ) => {
593+ t . strictEqual ( err , null )
594+ t . deepEqual ( info . path ,
595+ 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools' )
596+ } )
597+
598+ allVsVersions ( t , finder )
599+ finder . findVisualStudio ( )
600+ } )
601+
571602test ( 'run on a unusable VS Command Prompt' , function ( t ) {
572603 t . plan ( 2 )
573604
0 commit comments