Skip to content

Commit

Permalink
Hey lets do it this way too, just to make sure
Browse files Browse the repository at this point in the history
  • Loading branch information
zadjii-msft committed Apr 10, 2020
1 parent 238e61d commit 6ea74d6
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/cascadia/UnitTests_TerminalCore/ConptyRoundtripTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2192,10 +2192,11 @@ void ConptyRoundtripTests::OutputWrappedLineWithSpaceAtBottomOfBuffer()
void ConptyRoundtripTests::BreakLinesOnCursorMovement()
{
BEGIN_TEST_METHOD_PROPERTIES()
TEST_METHOD_PROPERTY(L"Data:cursorMovementMode", L"{0, 1}")
TEST_METHOD_PROPERTY(L"Data:cursorMovementMode", L"{0, 1, 2}")
END_TEST_METHOD_PROPERTIES();
constexpr int MoveCursorWithCUP = 0;
constexpr int MoveCursorWithNewline = 1;
constexpr int MoveCursorWithCRNL = 1;
constexpr int MoveCursorWithNLCR = 2;

INIT_TEST_PROPERTY(int, cursorMovementMode, L"Controls how we move the cursor, either with CUP or newline/carriage-return");

Expand Down Expand Up @@ -2270,14 +2271,23 @@ void ConptyRoundtripTests::BreakLinesOnCursorMovement()
hostSm.ProcessString(ss.str());
}
// As an additional test, try breaking lines manually with \r\n
else if (cursorMovementMode == MoveCursorWithNewline)
else if (cursorMovementMode == MoveCursorWithCRNL)
{
// Don't need to newline on the 0'th row
if (y > 0)
{
hostSm.ProcessString(L"\r\n");
}
}
// As an additional test, try breaking lines manually with \n\r
else if (cursorMovementMode == MoveCursorWithNLCR)
{
// Don't need to newline on the 0'th row
if (y > 0)
{
hostSm.ProcessString(L"\n\r");
}
}

// IMPORTANT! The way vim writes these blank lines is as '~' followed by
// enough spaces to fill the line.
Expand Down

1 comment on commit 6ea74d6

@github-actions

This comment was marked as resolved.

Please sign in to comment.