4
4
import * as assert from "assert" ;
5
5
import mockFS = require( "mock-fs" ) ;
6
6
import FileSystem = require( "mock-fs/lib/filesystem" ) ;
7
+ import * as os from "os" ;
7
8
import * as path from "path" ;
8
9
import rewire = require( "rewire" ) ;
9
10
import * as sinon from "sinon" ;
@@ -61,14 +62,13 @@ interface ITestPlatformSuccessCase extends ITestPlatform {
61
62
// Platform configurations where we expect to find a set of PowerShells
62
63
let successTestCases : ITestPlatformSuccessCase [ ] ;
63
64
64
- let msixAppDir : string ;
65
- let pwshMsixPath : string ;
66
- let pwshPreviewMsixPath : string ;
67
65
68
66
if ( process . platform === "win32" ) {
69
- msixAppDir = path . join ( process . env . LOCALAPPDATA ! , "Microsoft" , "WindowsApps" ) ;
70
- pwshMsixPath = path . join ( msixAppDir , "Microsoft.PowerShell_8wekyb3d8bbwe" , "pwsh.exe" ) ;
71
- pwshPreviewMsixPath = path . join ( msixAppDir , "Microsoft.PowerShellPreview_8wekyb3d8bbwe" , "pwsh.exe" ) ;
67
+ const msixAppDir = path . join ( process . env . LOCALAPPDATA ! , "Microsoft" , "WindowsApps" ) ;
68
+ const pwshMsixPath = path . join ( msixAppDir , "Microsoft.PowerShell_8wekyb3d8bbwe" , "pwsh.exe" ) ;
69
+ const pwshPreviewMsixPath = path . join ( msixAppDir , "Microsoft.PowerShellPreview_8wekyb3d8bbwe" , "pwsh.exe" ) ;
70
+ const pwshDailyDir = path . join ( process . env . LOCALAPPDATA ! , "Microsoft" , "powershell-daily" ) ;
71
+ const pwshDailyPath = path . join ( pwshDailyDir , "pwsh.exe" ) ;
72
72
73
73
successTestCases = [
74
74
{
@@ -124,6 +124,11 @@ if (process.platform === "win32") {
124
124
displayName : "Windows PowerShell (x86)" ,
125
125
supportsProperArguments : true
126
126
} ,
127
+ {
128
+ exePath : pwshDailyPath ,
129
+ displayName : "PowerShell Daily" ,
130
+ supportsProperArguments : true
131
+ }
127
132
] ,
128
133
filesystem : {
129
134
"C:\\Program Files\\PowerShell" : {
@@ -156,6 +161,9 @@ if (process.platform === "win32") {
156
161
"C:\\WINDOWS\\SysWOW64\\WindowsPowerShell\\v1.0" : {
157
162
"powershell.exe" : "" ,
158
163
} ,
164
+ [ pwshDailyDir ] : {
165
+ "pwsh.exe" : "" ,
166
+ }
159
167
} ,
160
168
} ,
161
169
{
@@ -436,6 +444,7 @@ if (process.platform === "win32") {
436
444
} ,
437
445
] ;
438
446
} else {
447
+ const pwshDailyDir = path . join ( os . homedir ( ) , ".powershell-daily" ) ;
439
448
successTestCases = [
440
449
{
441
450
name : "Linux (all installations)" ,
@@ -466,6 +475,11 @@ if (process.platform === "win32") {
466
475
displayName : "PowerShell Preview Snap" ,
467
476
supportsProperArguments : true
468
477
} ,
478
+ {
479
+ exePath : path . join ( pwshDailyDir , "pwsh" ) ,
480
+ displayName : "PowerShell Daily" ,
481
+ supportsProperArguments : true
482
+ }
469
483
] ,
470
484
filesystem : {
471
485
"/usr/bin" : {
@@ -476,6 +490,9 @@ if (process.platform === "win32") {
476
490
"pwsh" : "" ,
477
491
"pwsh-preview" : "" ,
478
492
} ,
493
+ [ pwshDailyDir ] : {
494
+ "pwsh" : ""
495
+ }
479
496
} ,
480
497
} ,
481
498
{
@@ -497,12 +514,20 @@ if (process.platform === "win32") {
497
514
displayName : "PowerShell Preview" ,
498
515
supportsProperArguments : true
499
516
} ,
517
+ {
518
+ exePath : path . join ( pwshDailyDir , "pwsh" ) ,
519
+ displayName : "PowerShell Daily" ,
520
+ supportsProperArguments : true
521
+ }
500
522
] ,
501
523
filesystem : {
502
524
"/usr/local/bin" : {
503
525
"pwsh" : "" ,
504
526
"pwsh-preview" : "" ,
505
527
} ,
528
+ [ pwshDailyDir ] : {
529
+ "pwsh" : ""
530
+ }
506
531
} ,
507
532
} ,
508
533
{
0 commit comments