44import * as assert from "assert" ;
55import mockFS = require( "mock-fs" ) ;
66import FileSystem = require( "mock-fs/lib/filesystem" ) ;
7+ import * as os from "os" ;
78import * as path from "path" ;
89import rewire = require( "rewire" ) ;
910import * as sinon from "sinon" ;
@@ -61,14 +62,13 @@ interface ITestPlatformSuccessCase extends ITestPlatform {
6162// Platform configurations where we expect to find a set of PowerShells
6263let successTestCases : ITestPlatformSuccessCase [ ] ;
6364
64- let msixAppDir : string ;
65- let pwshMsixPath : string ;
66- let pwshPreviewMsixPath : string ;
6765
6866if ( 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" ) ;
7272
7373 successTestCases = [
7474 {
@@ -124,6 +124,11 @@ if (process.platform === "win32") {
124124 displayName : "Windows PowerShell (x86)" ,
125125 supportsProperArguments : true
126126 } ,
127+ {
128+ exePath : pwshDailyPath ,
129+ displayName : "PowerShell Daily" ,
130+ supportsProperArguments : true
131+ }
127132 ] ,
128133 filesystem : {
129134 "C:\\Program Files\\PowerShell" : {
@@ -156,6 +161,9 @@ if (process.platform === "win32") {
156161 "C:\\WINDOWS\\SysWOW64\\WindowsPowerShell\\v1.0" : {
157162 "powershell.exe" : "" ,
158163 } ,
164+ [ pwshDailyDir ] : {
165+ "pwsh.exe" : "" ,
166+ }
159167 } ,
160168 } ,
161169 {
@@ -436,6 +444,7 @@ if (process.platform === "win32") {
436444 } ,
437445 ] ;
438446} else {
447+ const pwshDailyDir = path . join ( os . homedir ( ) , ".powershell-daily" ) ;
439448 successTestCases = [
440449 {
441450 name : "Linux (all installations)" ,
@@ -466,6 +475,11 @@ if (process.platform === "win32") {
466475 displayName : "PowerShell Preview Snap" ,
467476 supportsProperArguments : true
468477 } ,
478+ {
479+ exePath : path . join ( pwshDailyDir , "pwsh" ) ,
480+ displayName : "PowerShell Daily" ,
481+ supportsProperArguments : true
482+ }
469483 ] ,
470484 filesystem : {
471485 "/usr/bin" : {
@@ -476,6 +490,9 @@ if (process.platform === "win32") {
476490 "pwsh" : "" ,
477491 "pwsh-preview" : "" ,
478492 } ,
493+ [ pwshDailyDir ] : {
494+ "pwsh" : ""
495+ }
479496 } ,
480497 } ,
481498 {
@@ -497,12 +514,20 @@ if (process.platform === "win32") {
497514 displayName : "PowerShell Preview" ,
498515 supportsProperArguments : true
499516 } ,
517+ {
518+ exePath : path . join ( pwshDailyDir , "pwsh" ) ,
519+ displayName : "PowerShell Daily" ,
520+ supportsProperArguments : true
521+ }
500522 ] ,
501523 filesystem : {
502524 "/usr/local/bin" : {
503525 "pwsh" : "" ,
504526 "pwsh-preview" : "" ,
505527 } ,
528+ [ pwshDailyDir ] : {
529+ "pwsh" : ""
530+ }
506531 } ,
507532 } ,
508533 {
0 commit comments