mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Change test so output does not include newline. (#19026)
This commit is contained in:
@@ -54,14 +54,13 @@ Describe "PSCommand API tests" -Tag "CI" {
|
||||
|
||||
# We manually create a CmdletInfo here (with an unresolable command) to verify that CmdletInfo's are cloned.
|
||||
$cmdlet = [System.Management.Automation.CmdletInfo]::new('un-resolvable', [Microsoft.PowerShell.Commands.OutStringCommand])
|
||||
$null = $otherShell.AddCommand($cmdlet).AddParameter("InputObject", 'test')
|
||||
$null = $otherShell.AddCommand($cmdlet).AddParameter("InputObject", 'test').AddParameter("Stream")
|
||||
|
||||
# Setter for "Commands" calls PSCommand.Clone()
|
||||
$shell.Commands = $otherShell.Commands
|
||||
|
||||
$result = $shell.Invoke()
|
||||
$result | Should -Be "test
|
||||
"
|
||||
$result | Should -Be "test"
|
||||
}
|
||||
finally {
|
||||
$otherShell.Dispose()
|
||||
|
||||
Reference in New Issue
Block a user