Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,18 @@ public static void ReadFromOpenStandardInput()
{
Assert.Equal((byte)expectedLine[i], inputStream.ReadByte());
}
if (OperatingSystem.IsWindows())
{
Assert.Equal((byte)'\r', inputStream.ReadByte());
}
Assert.Equal((byte)'\n', inputStream.ReadByte());
AssertUserExpectedResults("the characters you typed properly echoed as you typed");
}

[ConditionalFact(typeof(ConsoleManualTests), nameof(ManualTestsEnabled))]
public static void ConsoleReadSupportsBackspace()
{
const string expectedLine = "aab\r";
string expectedLine = OperatingSystem.IsWindows() ? "aab\r\n" : "aab\r";

Console.WriteLine($"Please type 'a' 3 times, press 'Backspace' to erase 1, then type a single 'b' and press 'Enter'.");
foreach (char c in expectedLine)
Expand Down Expand Up @@ -322,6 +326,7 @@ public static void EncodingTest()
}

[ConditionalFact(typeof(ConsoleManualTests), nameof(ManualTestsEnabled))]
[PlatformSpecific(TestPlatforms.AnyUnix)] // Tests the Unix cached cursor position.
public static void CursorLeftFromLastColumn()
{
Console.CursorLeft = Console.BufferWidth - 1;
Expand Down
Loading