mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Allow Set-Clipboard to accept empty string (#14579)
This commit is contained in:
@@ -41,5 +41,15 @@ Describe 'Clipboard cmdlet tests' -Tag CI {
|
||||
'world' | Set-Clipboard -Append
|
||||
Get-Clipboard -Raw | Should -BeExactly "hello$([Environment]::NewLine)world"
|
||||
}
|
||||
|
||||
It 'Set-Clipboard accepts <value> string' -TestCases @(
|
||||
@{ value = 'empty'; text = "" }
|
||||
@{ value = 'null' ; text = $null }
|
||||
){
|
||||
param ($text)
|
||||
|
||||
$text | Set-Clipboard
|
||||
Get-Clipboard -Raw | Should -BeNullOrEmpty
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user