mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
Add simple Enable-PSBreakpoint and Disable-PSBreakpoint cmdlet tests
This commit is contained in:
1 parent
763fe2bdbf
commit
52ba25be69
1 file changed
+21
+21
@@ -0,0 +1,21 @@
|
|||||||
|
Describe "Enable and Disable PSBreakpoints" -Tag "CI" {
|
||||||
|
BeforeAll {
|
||||||
|
$path = Setup -F testbp.ps1 -content "get-command`nget-date`nget-location" -pass
|
||||||
|
$bp = set-psbreakpoint -script $path -line 2
|
||||||
|
disable-psbreakpoint $bp
|
||||||
|
}
|
||||||
|
AfterAll {
|
||||||
|
$bp | remove-psbreakpoint
|
||||||
|
}
|
||||||
|
It "Enable-PSBreakpoint should enable the breakpoint" {
|
||||||
|
$bp.Enabled | should be $false
|
||||||
|
Enable-PSBreakpoint $bp
|
||||||
|
$bp.Enabled | Should be $true
|
||||||
|
}
|
||||||
|
It "Disable-PSBreakpoint should disable the breakpoint" {
|
||||||
|
Enable-PSBreakpoint $bp
|
||||||
|
$bp.Enabled | Should be $true
|
||||||
|
Disable-PSBreakpoint $bp
|
||||||
|
$bp.Enabled | Should be $false
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user