Windows-powershell / PowerShell-master /test /powershell /Modules /Microsoft.PowerShell.Utility /Disable-PSBreakpoint.Tests.ps1
Download PowerShell-master/test/powershell/Modules/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.Tests.ps1 from MegaBites-AI/Windows-powershell: direct link, hf CLI and curl.
- Browser
- Download file 1.04 kB
-
https://huggingface.co/datasets/MegaBites-AI/Windows-powershell/resolve/main/PowerShell-master/test/powershell/Modules/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.Tests.ps1
- Command line
-
hf download hf://datasets/MegaBites-AI/Windows-powershell/PowerShell-master/test/powershell/Modules/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.Tests.ps1
-
curl -L -o Disable-PSBreakpoint.Tests.ps1 https://huggingface.co/datasets/MegaBites-AI/Windows-powershell/resolve/main/PowerShell-master/test/powershell/Modules/Microsoft.PowerShell.Utility/Disable-PSBreakpoint.Tests.ps1
1.04 kB
| # Copyright (c) Microsoft Corporation. All rights reserved. | |
| # Licensed under the MIT License. | |
| Describe 'Disable-PSBreakpoint' -Tags 'CI' { | |
| BeforeEach { | |
| # Set some breakpoints | |
| $lineBp = Set-PSBreakpoint -Line ([int]::MaxValue) -Script $PSCommandPath | |
| $cmdBp = Set-PSBreakpoint -Command Test-ThisIsNotReallyACommand | |
| $varBp = Set-PSBreakpoint -Variable thisIsNotReallyAVariable | |
| } | |
| AfterEach { | |
| # Clean up after ourselves | |
| Get-PSBreakpoint | Remove-PSBreakpoint | |
| } | |
| It 'Should disable breakpoints using pipeline input by value' { | |
| foreach ($bp in $lineBp, $cmdBp, $varBp) { | |
| $bp = $bp | Disable-PSBreakpoint -PassThru | |
| $bp.Enabled | Should -Not -BeTrue | |
| } | |
| } | |
| It 'Should disable breakpoints using pipeline input by property name' { | |
| foreach ($bp in $lineBp, $cmdBp, $varBp) { | |
| $bp = [pscustomobject]@{ Id = $bp.Id } | Disable-PSBreakpoint -PassThru | |
| $bp.Enabled | Should -Not -BeTrue | |
| } | |
| } | |
| } | |