Change test so output does not include newline. (#19026)

This commit is contained in:
James Truher [MSFT]
2023-01-25 18:02:20 -08:00
committed by GitHub
parent 3a17d0230f
commit 5f3100cd95
@@ -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()