/
githubmirror
/
PowerShell
Обзор
Документация
Войти
/
githubmirror
/
PowerShell
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/powershell/Modules/Microsoft.PowerShell.Utility/Wait-Debugger.Tests.ps1
37 строк
1 KB
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 'Tests for Wait-Debugger' -Tags "CI" { BeforeAll { Register-DebuggerHandler } AfterAll { Unregister-DebuggerHandler } Context 'Wait-Debugger should break on the statement containing the Wait-Debugger command' { BeforeAll { $testScript = { function Test-Break { [CmdletBinding()] param() Wait-Debugger 'The debugger should break on the previous line, not on this line.' } Test-Break } $results = @(Test-Debugger -Scriptblock $testScript) } It 'Should show 1 debugger command was invoked' { # There is always an implicit 'c' command that keeps the debugger automation moving $results.Count | Should -Be 1 } It 'The breakpoint should be the statement containing Wait-Debugger' { $results[0] | ShouldHaveExtent -Line 5 -FromColumn 21 -ToColumn 34 } } }