mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
This reverts commit b525b1f0bd.
This commit is contained in:
committed by
Aditya Patwardhan
parent
655b8b614c
commit
db60f0614a
@@ -1365,14 +1365,7 @@ namespace Microsoft.PowerShell
|
||||
}
|
||||
|
||||
var c = unchecked((char)inC);
|
||||
if (c == '\b' && !NoPrompt && sb.Length == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (!NoPrompt)
|
||||
{
|
||||
Console.Out.Write(c);
|
||||
}
|
||||
if (!NoPrompt) Console.Out.Write(c);
|
||||
|
||||
if (c == '\r')
|
||||
{
|
||||
|
||||
@@ -476,18 +476,6 @@ foo
|
||||
$process.StandardOutput.ReadToEnd() | Should -Be "PS> "
|
||||
EnsureChildHasExited $process
|
||||
}
|
||||
|
||||
It "Redirected input and sending backspace" {
|
||||
# This test is for issue #8193, in which a backspace at the beginning of a command crashes powershell
|
||||
$si = NewProcessStartInfo "-noprofile -nologo" -RedirectStdIn
|
||||
$process = RunPowerShell $si
|
||||
$process.StandardInput.Write("`$function:prompt = { 'PS> ' }`n")
|
||||
$null = $process.StandardOutput.ReadLine()
|
||||
$process.StandardInput.Write("`bexit`n")
|
||||
$process.StandardOutput.ReadLine() | Should -Be "PS> exit"
|
||||
$process.StandardInput.Close()
|
||||
EnsureChildHasExited $process
|
||||
}
|
||||
}
|
||||
|
||||
Context "Exception handling" {
|
||||
|
||||
Reference in New Issue
Block a user