Skip to content

Commit c072f5b

Browse files
authored
Add test for LanguageMode using remoting (PowerShell#17803)
1 parent 51b2ac4 commit c072f5b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

test/powershell/engine/Remoting/RemoteSession.Basic.Tests.ps1

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,5 +338,14 @@ Describe "Remoting loopback tests" -Tags @('CI', 'RequireAdminOnWindows') {
338338
$session | Remove-PSSession -ErrorAction Ignore
339339
}
340340
}
341-
}
342341

342+
It 'Language Mode is FullLanguage by default' {
343+
$session = New-RemoteSession -ConfigurationName $endPoint
344+
try {
345+
$result = Invoke-Command -Session $session -ScriptBlock { $ExecutionContext.SessionState.LanguageMode }
346+
$result | Should -Be ([System.Management.Automation.PSLanguageMode]::FullLanguage)
347+
} finally {
348+
$session | Remove-PSSession -ErrorAction Ignore
349+
}
350+
}
351+
}

0 commit comments

Comments
 (0)