Skip to content

Commit

Permalink
Add unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
j4james committed Aug 3, 2024
1 parent d581449 commit e705479
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions src/terminal/adapter/ut_adapter/adapterTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1942,6 +1942,55 @@ class AdapterTest
requestSetting(L"m");
_testGetSet->ValidateInputEvent(L"\033P1$r0;38:2::12:34:56;48:2::65:43:21;58:2::128:222:45m\033\\");

Log::Comment(L"Requesting DECSCUSR style (blinking block).");
_testGetSet->PrepData();
_testGetSet->_textBuffer->GetCursor().SetBlinkingAllowed(true);
_testGetSet->_textBuffer->GetCursor().SetType(CursorType::FullBox);
requestSetting(L" q");
_testGetSet->ValidateInputEvent(L"\033P1$r1 q\033\\");

Log::Comment(L"Requesting DECSCUSR style (steady block).");
_testGetSet->PrepData();
_testGetSet->_textBuffer->GetCursor().SetBlinkingAllowed(false);
_testGetSet->_textBuffer->GetCursor().SetType(CursorType::FullBox);
requestSetting(L" q");
_testGetSet->ValidateInputEvent(L"\033P1$r2 q\033\\");

Log::Comment(L"Requesting DECSCUSR style (blinking underline).");
_testGetSet->PrepData();
_testGetSet->_textBuffer->GetCursor().SetBlinkingAllowed(true);
_testGetSet->_textBuffer->GetCursor().SetType(CursorType::Underscore);
requestSetting(L" q");
_testGetSet->ValidateInputEvent(L"\033P1$r3 q\033\\");

Log::Comment(L"Requesting DECSCUSR style (steady underline).");
_testGetSet->PrepData();
_testGetSet->_textBuffer->GetCursor().SetBlinkingAllowed(false);
_testGetSet->_textBuffer->GetCursor().SetType(CursorType::Underscore);
requestSetting(L" q");
_testGetSet->ValidateInputEvent(L"\033P1$r4 q\033\\");

Log::Comment(L"Requesting DECSCUSR style (blinking bar).");
_testGetSet->PrepData();
_testGetSet->_textBuffer->GetCursor().SetBlinkingAllowed(true);
_testGetSet->_textBuffer->GetCursor().SetType(CursorType::VerticalBar);
requestSetting(L" q");
_testGetSet->ValidateInputEvent(L"\033P1$r5 q\033\\");

Log::Comment(L"Requesting DECSCUSR style (steady bar).");
_testGetSet->PrepData();
_testGetSet->_textBuffer->GetCursor().SetBlinkingAllowed(false);
_testGetSet->_textBuffer->GetCursor().SetType(CursorType::VerticalBar);
requestSetting(L" q");
_testGetSet->ValidateInputEvent(L"\033P1$r6 q\033\\");

Log::Comment(L"Requesting DECSCUSR style (non-standard).");
_testGetSet->PrepData();
_testGetSet->_textBuffer->GetCursor().SetBlinkingAllowed(true);
_testGetSet->_textBuffer->GetCursor().SetType(CursorType::Legacy);
requestSetting(L" q");
_testGetSet->ValidateInputEvent(L"\033P1$r0 q\033\\");

Log::Comment(L"Requesting DECSCA attributes (unprotected).");
_testGetSet->PrepData();
attribute = {};
Expand Down

0 comments on commit e705479

Please sign in to comment.