Skip to content

Commit 7e79ab5

Browse files
committed
Rewrite COOKED_READ_DATA
1 parent f75cfe5 commit 7e79ab5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1196
-6980
lines changed

.github/actions/spelling/expect/alphabet.txt

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ BBBBCCCCC
2121
BBGGRR
2222
efg
2323
EFG
24+
efgh
2425
EFGh
2526
KLMNOQQQQQQQQQQ
2627
QQQQQQQQQQABCDEFGHIJ

.github/actions/spelling/expect/expect.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ FSINFOCLASS
690690
fte
691691
Ftm
692692
Fullscreens
693-
fullwidth
693+
Fullwidth
694694
FUNCTIONCALL
695695
fuzzer
696696
fuzzmain
@@ -1117,6 +1117,7 @@ MDs
11171117
MEASUREITEM
11181118
megamix
11191119
memallocator
1120+
meme
11201121
MENUCHAR
11211122
MENUCONTROL
11221123
MENUDROPALIGNMENT

src/cascadia/UnitTests_TerminalCore/ConptyRoundtripTests.cpp

+2-22
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#include "../host/readDataCooked.hpp"
2222
#include "../host/output.h"
2323
#include "../host/_stream.h" // For WriteCharsLegacy
24-
#include "../host/cmdline.h" // For WC_INTERACTIVE
2524
#include "test/CommonState.hpp"
2625

2726
#include "../cascadia/TerminalCore/Terminal.hpp"
@@ -3166,20 +3165,6 @@ void ConptyRoundtripTests::NewLinesAtBottomWithBackground()
31663165
verifyBuffer(*termTb, term->_mutableViewport.ToExclusive());
31673166
}
31683167

3169-
void doWriteCharsLegacy(SCREEN_INFORMATION& screenInfo, const std::wstring_view string, DWORD flags = 0)
3170-
{
3171-
auto dwNumBytes = string.size() * sizeof(wchar_t);
3172-
VERIFY_NT_SUCCESS(WriteCharsLegacy(screenInfo,
3173-
string.data(),
3174-
string.data(),
3175-
string.data(),
3176-
&dwNumBytes,
3177-
nullptr,
3178-
screenInfo.GetTextBuffer().GetCursor().GetPosition().x,
3179-
flags,
3180-
nullptr));
3181-
}
3182-
31833168
void ConptyRoundtripTests::WrapNewLineAtBottom()
31843169
{
31853170
// The actual bug case is
@@ -3221,11 +3206,6 @@ void ConptyRoundtripTests::WrapNewLineAtBottom()
32213206
return;
32223207
}
32233208

3224-
// I've tested this with 0x0, 0x4, 0x80, 0x84, and 0-8, and none of these
3225-
// flags seem to make a difference. So we're just assuming 0 here, so we
3226-
// don't test a bunch of redundant cases.
3227-
const auto writeCharsLegacyMode = 0;
3228-
32293209
// This test was originally written for
32303210
// https://github.com/microsoft/terminal/issues/5691
32313211
//
@@ -3264,7 +3244,7 @@ void ConptyRoundtripTests::WrapNewLineAtBottom()
32643244
}
32653245
else if (writingMethod == PrintWithWriteCharsLegacy)
32663246
{
3267-
doWriteCharsLegacy(si, str, writeCharsLegacyMode);
3247+
WriteCharsLegacy(si, str, false, nullptr));
32683248
}
32693249
};
32703250

@@ -3422,7 +3402,7 @@ void ConptyRoundtripTests::WrapNewLineAtBottomLikeMSYS()
34223402
}
34233403
else if (writingMethod == PrintWithWriteCharsLegacy)
34243404
{
3425-
doWriteCharsLegacy(si, str, WC_INTERACTIVE);
3405+
WriteCharsLegacy(si, str, true, nullptr));
34263406
}
34273407
};
34283408

0 commit comments

Comments
 (0)