mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Reorganize tests
- Pester source code moved to `test/Pester`, deleted `ext-src`. - Pester tests (.ps1 files) moved to `test/powershell` - xUnit tests (.cs files) moved to `test/csharp` - Third-party script test moved to `test/shebang`
This commit is contained in:
1 parent
ec08d9f46c
commit
bbebf2f76a
105 files changed
+1
-1
No files matched your search
@@ -0,0 +1,34 @@
|
||||
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
|
||||
Describe "Set-PSBreakpoint" {
|
||||
# Set up test script
|
||||
$testScript = "$here/psbreakpointtestscript.ps1"
|
||||
|
||||
"`$var = 1 " > $testScript
|
||||
|
||||
It "Should be able to set a psbreakpoint on a line" {
|
||||
$lineNumber = 1
|
||||
$(Set-PSBreakpoint -Line $lineNumber -Script $testScript).Line | Should Be $lineNumber
|
||||
}
|
||||
|
||||
It "Should throw when a string is entered for a line number" {
|
||||
{
|
||||
$lineNumber = "one"
|
||||
$(Set-PSBreakpoint -Line $lineNumber -Script $testScript).Line
|
||||
|
||||
} | Should Throw
|
||||
}
|
||||
|
||||
It "Should be able to set a psbreakpoint on a Command" {
|
||||
$command = "theCommand"
|
||||
$(Set-PSBreakpoint -Command $command -Script $testScript).Command | Should Be $command
|
||||
}
|
||||
|
||||
It "Should be able to set a psbreakpoint on a variable" {
|
||||
$var = "theVariable"
|
||||
$(Set-PSBreakpoint -Command $var -Script $testScript).Command | Should Be $var
|
||||
}
|
||||
|
||||
# clean up after ourselves
|
||||
Remove-Item -Path $testScript
|
||||
}
|
||||
Reference in new issue
Block a user