/
githubmirror
/
PowerShell
Обзор
Документация
Войти
/
githubmirror
/
PowerShell
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/powershell/Modules/Microsoft.PowerShell.Core/Out-Host.Tests.ps1
27 строк
824 B
xtqqczze
Use correct casing for cmdlet name and cmdlet parameter name in *.ps1 files (#12584)
07 май 2020, 15:00
Не верифицирован
07 май 2020, 15:00
f438220
Код
Авторство
О чём код?
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. Describe "Out-Host Tests" -Tag CI { BeforeAll { $th = New-TestHost $rs = [runspacefactory]::Createrunspace($th) $rs.open() $ps = [powershell]::Create() $ps.Runspace = $rs $ps.Commands.Clear() } AfterEach { $ps.Commands.Clear() } AfterAll { $rs.Close() $rs.Dispose() $ps.Dispose() } It "Out-Host writes to host output" { $stringToWrite = "thing to write" $stringExpected = "::$($stringToWrite):NewLine" $result = $ps.AddScript("Out-Host -inputobject '$stringToWrite'").Invoke() $th.UI.Streams.ConsoleOutput.Count | Should -Be 1 $th.UI.Streams.ConsoleOutput[0] | Should -BeExactly $stringExpected } }