-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into dev/migrie/fhl/non-te…
…rminal-panes-2023
- Loading branch information
Showing
134 changed files
with
2,015 additions
and
724 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ CMMI | |
copyable | ||
Counterintuitively | ||
CtrlDToClose | ||
CVS | ||
CUI | ||
cybersecurity | ||
dalet | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,7 @@ MSAA | |
msixbundle | ||
MSVC | ||
MSVCP | ||
mtu | ||
muxc | ||
netcore | ||
Onefuzz | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -453,6 +453,7 @@ DECSTBM | |
DECSTGLT | ||
DECSTR | ||
DECSWL | ||
DECSWT | ||
DECTABSR | ||
DECTCEM | ||
DECXCPR | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
|
||
#include "precomp.h" | ||
|
||
#include "WexTestClass.h" | ||
#include "../textBuffer.hpp" | ||
#include "../../renderer/inc/DummyRenderer.hpp" | ||
|
||
template<> | ||
class WEX::TestExecution::VerifyOutputTraits<std::vector<til::point_span>> | ||
{ | ||
public: | ||
static WEX::Common::NoThrowString ToString(const std::vector<til::point_span>& vec) | ||
{ | ||
WEX::Common::NoThrowString str; | ||
str.Append(L"{ "); | ||
for (size_t i = 0; i < vec.size(); ++i) | ||
{ | ||
const auto& s = vec[i]; | ||
if (i != 0) | ||
{ | ||
str.Append(L", "); | ||
} | ||
str.AppendFormat(L"{(%d, %d), (%d, %d)}", s.start.x, s.start.y, s.end.x, s.end.y); | ||
} | ||
str.Append(L" }"); | ||
return str; | ||
} | ||
}; | ||
|
||
class UTextAdapterTests | ||
{ | ||
TEST_CLASS(UTextAdapterTests); | ||
|
||
TEST_METHOD(Unicode) | ||
{ | ||
DummyRenderer renderer; | ||
TextBuffer buffer{ til::size{ 24, 1 }, TextAttribute{}, 0, false, renderer }; | ||
|
||
RowWriteState state{ | ||
.text = L"abc 𝒶𝒷𝒸 abc ネコちゃん", | ||
}; | ||
buffer.Write(0, TextAttribute{}, state); | ||
VERIFY_IS_TRUE(state.text.empty()); | ||
|
||
static constexpr auto s = [](til::CoordType beg, til::CoordType end) -> til::point_span { | ||
return { { beg, 0 }, { end, 0 } }; | ||
}; | ||
|
||
auto expected = std::vector{ s(0, 2), s(8, 10) }; | ||
auto actual = buffer.SearchText(L"abc", false); | ||
VERIFY_ARE_EQUAL(expected, actual); | ||
|
||
expected = std::vector{ s(5, 5) }; | ||
actual = buffer.SearchText(L"𝒷", false); | ||
VERIFY_ARE_EQUAL(expected, actual); | ||
|
||
expected = std::vector{ s(12, 15) }; | ||
actual = buffer.SearchText(L"ネコ", false); | ||
VERIFY_ARE_EQUAL(expected, actual); | ||
} | ||
}; |
Oops, something went wrong.