From 0c1274011c32fd7a45536065a2016f8a919e4756 Mon Sep 17 00:00:00 2001 From: Steve Lee Date: Sat, 4 May 2019 06:45:43 -0700 Subject: [PATCH] fix creation of profile --- test/powershell/Host/ConsoleHost.Tests.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/powershell/Host/ConsoleHost.Tests.ps1 b/test/powershell/Host/ConsoleHost.Tests.ps1 index 30529c301d..6ed66b522d 100644 --- a/test/powershell/Host/ConsoleHost.Tests.ps1 +++ b/test/powershell/Host/ConsoleHost.Tests.ps1 @@ -250,8 +250,8 @@ Describe "ConsoleHost unit tests" -tags "Feature" { if (Test-Path $profile) { Remove-Item -Path "$profile.backup" -ErrorAction SilentlyContinue Rename-Item -Path $profile -NewName "$profile.backup" - Set-Content -Path $profile -Value "'profile-loaded'" -Force } + Set-Content -Path $profile -Value "'profile-loaded'" -Force } AfterAll { @@ -267,6 +267,7 @@ Describe "ConsoleHost unit tests" -tags "Feature" { ){ param($switch) + Get-Content $profile -Raw | Should -Not -BeNullOrEmpty & pwsh $switch -c exit | Should -BeExactly "profile-loaded" } }