@@ -468,7 +468,17 @@ if (process.platform === "win32") {
468
468
isProcess64Bit : true ,
469
469
} ,
470
470
environmentVars : { } ,
471
+ // Note that for each given path, we expect:
472
+ // 1. The path as-is.
473
+ // 2. Any expected permutations of the path (for example, with a tilde or folder expanded, and/or '.exe' added).
474
+ // 3. The path as-is again (in order for a warning to be displayed at the correct time).
475
+ // An improvement here would be to check the suppressWarning field, but it's not currently exposed.
471
476
expectedPowerShellSequence : [
477
+ {
478
+ exePath : "C:\\Users\\test\\pwsh\\pwsh.exe" ,
479
+ displayName : "pwsh" ,
480
+ supportsProperArguments : true
481
+ } ,
472
482
{
473
483
exePath : "C:\\Users\\test\\pwsh\\pwsh.exe" ,
474
484
displayName : "pwsh" ,
@@ -479,6 +489,11 @@ if (process.platform === "win32") {
479
489
displayName : "pwsh-tilde" ,
480
490
supportsProperArguments : true
481
491
} ,
492
+ {
493
+ exePath : path . join ( os . homedir ( ) , "pwsh" , "pwsh.exe" ) ,
494
+ displayName : "pwsh-tilde" ,
495
+ supportsProperArguments : true
496
+ } ,
482
497
{
483
498
exePath : "C:\\Users\\test\\pwsh\\pwsh" ,
484
499
displayName : "pwsh-no-exe" ,
@@ -499,6 +514,11 @@ if (process.platform === "win32") {
499
514
displayName : "pwsh-no-exe" ,
500
515
supportsProperArguments : true
501
516
} ,
517
+ {
518
+ exePath : "C:\\Users\\test\\pwsh\\pwsh" ,
519
+ displayName : "pwsh-no-exe" ,
520
+ supportsProperArguments : true
521
+ } ,
502
522
{
503
523
exePath : "C:\\Users\\test\\pwsh\\" ,
504
524
displayName : "pwsh-folder" ,
@@ -514,6 +534,11 @@ if (process.platform === "win32") {
514
534
displayName : "pwsh-folder" ,
515
535
supportsProperArguments : true
516
536
} ,
537
+ {
538
+ exePath : "C:\\Users\\test\\pwsh\\" ,
539
+ displayName : "pwsh-folder" ,
540
+ supportsProperArguments : true
541
+ } ,
517
542
{
518
543
exePath : "C:\\Users\\test\\pwsh" ,
519
544
displayName : "pwsh-folder-no-slash" ,
@@ -534,6 +559,16 @@ if (process.platform === "win32") {
534
559
displayName : "pwsh-folder-no-slash" ,
535
560
supportsProperArguments : true
536
561
} ,
562
+ {
563
+ exePath : "C:\\Users\\test\\pwsh" ,
564
+ displayName : "pwsh-folder-no-slash" ,
565
+ supportsProperArguments : true
566
+ } ,
567
+ {
568
+ exePath : "C:\\Users\\test\\pwsh\\pwsh.exe" ,
569
+ displayName : "pwsh-single-quotes" ,
570
+ supportsProperArguments : true
571
+ } ,
537
572
{
538
573
exePath : "C:\\Users\\test\\pwsh\\pwsh.exe" ,
539
574
displayName : "pwsh-single-quotes" ,
@@ -544,6 +579,11 @@ if (process.platform === "win32") {
544
579
displayName : "pwsh-double-quotes" ,
545
580
supportsProperArguments : true
546
581
} ,
582
+ {
583
+ exePath : "C:\\Users\\test\\pwsh\\pwsh.exe" ,
584
+ displayName : "pwsh-double-quotes" ,
585
+ supportsProperArguments : true
586
+ } ,
547
587
] ,
548
588
filesystem : { } ,
549
589
}
@@ -760,19 +800,34 @@ if (process.platform === "win32") {
760
800
761
801
successAdditionalTestCases = [
762
802
{ // Also sufficient for macOS as the behavior is the same
763
- name : "Linux (Additional PowerShell Executables)" ,
803
+ name : "Linux/macOS (Additional PowerShell Executables)" ,
764
804
platformDetails : {
765
805
operatingSystem : platform . OperatingSystem . Linux ,
766
806
isOS64Bit : true ,
767
807
isProcess64Bit : true ,
768
808
} ,
769
809
environmentVars : { } ,
810
+ // Note that for each given path, we expect:
811
+ // 1. The path as-is.
812
+ // 2. Any expected permutations of the path (for example, with a tilde or folder expanded).
813
+ // 3. The path as-is again (in order for a warning to be displayed at the correct time).
814
+ // An improvement here would be to check the suppressWarning field, but it's not currently exposed.
770
815
expectedPowerShellSequence : [
771
816
{
772
817
exePath : "/home/bin/pwsh" ,
773
818
displayName : "pwsh" ,
774
819
supportsProperArguments : true
775
820
} ,
821
+ {
822
+ exePath : "/home/bin/pwsh" ,
823
+ displayName : "pwsh" ,
824
+ supportsProperArguments : true
825
+ } ,
826
+ {
827
+ exePath : path . join ( os . homedir ( ) , "bin" , "pwsh" ) ,
828
+ displayName : "pwsh-tilde" ,
829
+ supportsProperArguments : true
830
+ } ,
776
831
{
777
832
exePath : path . join ( os . homedir ( ) , "bin" , "pwsh" ) ,
778
833
displayName : "pwsh-tilde" ,
@@ -788,6 +843,11 @@ if (process.platform === "win32") {
788
843
displayName : "pwsh-folder" ,
789
844
supportsProperArguments : true
790
845
} ,
846
+ {
847
+ exePath : "/home/bin/" ,
848
+ displayName : "pwsh-folder" ,
849
+ supportsProperArguments : true
850
+ } ,
791
851
{
792
852
exePath : "/home/bin" ,
793
853
displayName : "pwsh-folder-no-slash" ,
@@ -798,6 +858,16 @@ if (process.platform === "win32") {
798
858
displayName : "pwsh-folder-no-slash" ,
799
859
supportsProperArguments : true
800
860
} ,
861
+ {
862
+ exePath : "/home/bin" ,
863
+ displayName : "pwsh-folder-no-slash" ,
864
+ supportsProperArguments : true
865
+ } ,
866
+ {
867
+ exePath : "/home/bin/pwsh" ,
868
+ displayName : "pwsh-single-quotes" ,
869
+ supportsProperArguments : true
870
+ } ,
801
871
{
802
872
exePath : "/home/bin/pwsh" ,
803
873
displayName : "pwsh-single-quotes" ,
@@ -808,6 +878,11 @@ if (process.platform === "win32") {
808
878
displayName : "pwsh-double-quotes" ,
809
879
supportsProperArguments : true
810
880
} ,
881
+ {
882
+ exePath : "/home/bin/pwsh" ,
883
+ displayName : "pwsh-double-quotes" ,
884
+ supportsProperArguments : true
885
+ } ,
811
886
] ,
812
887
filesystem : { } ,
813
888
}
0 commit comments