mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-11 04:38:24 -06:00
Remove the --vtmode flag (#17572)
After the ConPTY rewrite in #17510 we'll not modify any VT sequences anymore. This means that the `--vtmode` flag uses its only function. Its only known user is `telnet.exe` which needs to be updated to sanitize the output on its own. See MSFT:52532514
This commit is contained in:
parent
08a0bff7da
commit
2769bb591b
@ -7,7 +7,6 @@
|
|||||||
#include <shellapi.h>
|
#include <shellapi.h>
|
||||||
using namespace Microsoft::Console::Utils;
|
using namespace Microsoft::Console::Utils;
|
||||||
|
|
||||||
const std::wstring_view ConsoleArguments::VT_MODE_ARG = L"--vtmode";
|
|
||||||
const std::wstring_view ConsoleArguments::HEADLESS_ARG = L"--headless";
|
const std::wstring_view ConsoleArguments::HEADLESS_ARG = L"--headless";
|
||||||
const std::wstring_view ConsoleArguments::SERVER_HANDLE_ARG = L"--server";
|
const std::wstring_view ConsoleArguments::SERVER_HANDLE_ARG = L"--server";
|
||||||
const std::wstring_view ConsoleArguments::SIGNAL_HANDLE_ARG = L"--signal";
|
const std::wstring_view ConsoleArguments::SIGNAL_HANDLE_ARG = L"--signal";
|
||||||
@ -112,7 +111,6 @@ ConsoleArguments::ConsoleArguments(const std::wstring& commandline,
|
|||||||
_vtOutHandle(hStdOut)
|
_vtOutHandle(hStdOut)
|
||||||
{
|
{
|
||||||
_clientCommandline = L"";
|
_clientCommandline = L"";
|
||||||
_vtMode = L"";
|
|
||||||
_headless = false;
|
_headless = false;
|
||||||
_runAsComServer = false;
|
_runAsComServer = false;
|
||||||
_createServerHandle = true;
|
_createServerHandle = true;
|
||||||
@ -138,7 +136,6 @@ ConsoleArguments& ConsoleArguments::operator=(const ConsoleArguments& other)
|
|||||||
_clientCommandline = other._clientCommandline;
|
_clientCommandline = other._clientCommandline;
|
||||||
_vtInHandle = other._vtInHandle;
|
_vtInHandle = other._vtInHandle;
|
||||||
_vtOutHandle = other._vtOutHandle;
|
_vtOutHandle = other._vtOutHandle;
|
||||||
_vtMode = other._vtMode;
|
|
||||||
_headless = other._headless;
|
_headless = other._headless;
|
||||||
_createServerHandle = other._createServerHandle;
|
_createServerHandle = other._createServerHandle;
|
||||||
_serverHandle = other._serverHandle;
|
_serverHandle = other._serverHandle;
|
||||||
@ -474,10 +471,6 @@ void ConsoleArguments::s_ConsumeArg(_Inout_ std::vector<std::wstring>& args, _In
|
|||||||
s_ConsumeArg(args, i);
|
s_ConsumeArg(args, i);
|
||||||
hr = S_OK;
|
hr = S_OK;
|
||||||
}
|
}
|
||||||
else if (arg == VT_MODE_ARG)
|
|
||||||
{
|
|
||||||
hr = s_GetArgumentValue(args, i, &_vtMode);
|
|
||||||
}
|
|
||||||
else if (arg == WIDTH_ARG)
|
else if (arg == WIDTH_ARG)
|
||||||
{
|
{
|
||||||
hr = s_GetArgumentValue(args, i, &_width);
|
hr = s_GetArgumentValue(args, i, &_width);
|
||||||
@ -630,11 +623,6 @@ std::wstring ConsoleArguments::GetClientCommandline() const
|
|||||||
return _clientCommandline;
|
return _clientCommandline;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::wstring ConsoleArguments::GetVtMode() const
|
|
||||||
{
|
|
||||||
return _vtMode;
|
|
||||||
}
|
|
||||||
|
|
||||||
const std::wstring& ConsoleArguments::GetTextMeasurement() const
|
const std::wstring& ConsoleArguments::GetTextMeasurement() const
|
||||||
{
|
{
|
||||||
return _textMeasurement;
|
return _textMeasurement;
|
||||||
|
|||||||
@ -84,7 +84,6 @@ private:
|
|||||||
const std::wstring clientCommandline,
|
const std::wstring clientCommandline,
|
||||||
const HANDLE vtInHandle,
|
const HANDLE vtInHandle,
|
||||||
const HANDLE vtOutHandle,
|
const HANDLE vtOutHandle,
|
||||||
const std::wstring vtMode,
|
|
||||||
const short width,
|
const short width,
|
||||||
const short height,
|
const short height,
|
||||||
const bool forceV1,
|
const bool forceV1,
|
||||||
@ -99,7 +98,6 @@ private:
|
|||||||
_clientCommandline(clientCommandline),
|
_clientCommandline(clientCommandline),
|
||||||
_vtInHandle(vtInHandle),
|
_vtInHandle(vtInHandle),
|
||||||
_vtOutHandle(vtOutHandle),
|
_vtOutHandle(vtOutHandle),
|
||||||
_vtMode(vtMode),
|
|
||||||
_width(width),
|
_width(width),
|
||||||
_height(height),
|
_height(height),
|
||||||
_forceV1(forceV1),
|
_forceV1(forceV1),
|
||||||
@ -123,7 +121,6 @@ private:
|
|||||||
|
|
||||||
HANDLE _vtOutHandle;
|
HANDLE _vtOutHandle;
|
||||||
|
|
||||||
std::wstring _vtMode;
|
|
||||||
std::wstring _textMeasurement;
|
std::wstring _textMeasurement;
|
||||||
|
|
||||||
bool _forceNoHandoff;
|
bool _forceNoHandoff;
|
||||||
@ -178,7 +175,6 @@ namespace WEX
|
|||||||
L"Use VT Handles: '%ws',\r\n"
|
L"Use VT Handles: '%ws',\r\n"
|
||||||
L"VT In Handle: '0x%x',\r\n"
|
L"VT In Handle: '0x%x',\r\n"
|
||||||
L"VT Out Handle: '0x%x',\r\n"
|
L"VT Out Handle: '0x%x',\r\n"
|
||||||
L"Vt Mode: '%ws',\r\n"
|
|
||||||
L"WidthxHeight: '%dx%d',\r\n"
|
L"WidthxHeight: '%dx%d',\r\n"
|
||||||
L"ForceV1: '%ws',\r\n"
|
L"ForceV1: '%ws',\r\n"
|
||||||
L"Headless: '%ws',\r\n"
|
L"Headless: '%ws',\r\n"
|
||||||
@ -192,7 +188,6 @@ namespace WEX
|
|||||||
s_ToBoolString(ci.HasVtHandles()),
|
s_ToBoolString(ci.HasVtHandles()),
|
||||||
ci.GetVtInHandle(),
|
ci.GetVtInHandle(),
|
||||||
ci.GetVtOutHandle(),
|
ci.GetVtOutHandle(),
|
||||||
ci.GetVtMode().c_str(),
|
|
||||||
ci.GetWidth(),
|
ci.GetWidth(),
|
||||||
ci.GetHeight(),
|
ci.GetHeight(),
|
||||||
s_ToBoolString(ci.GetForceV1()),
|
s_ToBoolString(ci.GetForceV1()),
|
||||||
@ -222,7 +217,6 @@ namespace WEX
|
|||||||
expected.HasVtHandles() == actual.HasVtHandles() &&
|
expected.HasVtHandles() == actual.HasVtHandles() &&
|
||||||
expected.GetVtInHandle() == actual.GetVtInHandle() &&
|
expected.GetVtInHandle() == actual.GetVtInHandle() &&
|
||||||
expected.GetVtOutHandle() == actual.GetVtOutHandle() &&
|
expected.GetVtOutHandle() == actual.GetVtOutHandle() &&
|
||||||
expected.GetVtMode() == actual.GetVtMode() &&
|
|
||||||
expected.GetWidth() == actual.GetWidth() &&
|
expected.GetWidth() == actual.GetWidth() &&
|
||||||
expected.GetHeight() == actual.GetHeight() &&
|
expected.GetHeight() == actual.GetHeight() &&
|
||||||
expected.GetForceV1() == actual.GetForceV1() &&
|
expected.GetForceV1() == actual.GetForceV1() &&
|
||||||
@ -249,7 +243,6 @@ namespace WEX
|
|||||||
return object.GetClientCommandline().empty() &&
|
return object.GetClientCommandline().empty() &&
|
||||||
(object.GetVtInHandle() == 0 || object.GetVtInHandle() == INVALID_HANDLE_VALUE) &&
|
(object.GetVtInHandle() == 0 || object.GetVtInHandle() == INVALID_HANDLE_VALUE) &&
|
||||||
(object.GetVtOutHandle() == 0 || object.GetVtOutHandle() == INVALID_HANDLE_VALUE) &&
|
(object.GetVtOutHandle() == 0 || object.GetVtOutHandle() == INVALID_HANDLE_VALUE) &&
|
||||||
object.GetVtMode().empty() &&
|
|
||||||
!object.GetForceV1() &&
|
!object.GetForceV1() &&
|
||||||
(object.GetWidth() == 0) &&
|
(object.GetWidth() == 0) &&
|
||||||
(object.GetHeight() == 0) &&
|
(object.GetHeight() == 0) &&
|
||||||
|
|||||||
@ -3,17 +3,14 @@
|
|||||||
|
|
||||||
#include "precomp.h"
|
#include "precomp.h"
|
||||||
#include "VtIo.hpp"
|
#include "VtIo.hpp"
|
||||||
|
|
||||||
|
#include "handle.h" // LockConsole
|
||||||
|
#include "output.h" // CloseConsoleProcessState
|
||||||
#include "../interactivity/inc/ServiceLocator.hpp"
|
#include "../interactivity/inc/ServiceLocator.hpp"
|
||||||
|
|
||||||
#include "../renderer/vt/XtermEngine.hpp"
|
|
||||||
#include "../renderer/vt/Xterm256Engine.hpp"
|
|
||||||
|
|
||||||
#include "../renderer/base/renderer.hpp"
|
#include "../renderer/base/renderer.hpp"
|
||||||
|
#include "../renderer/vt/Xterm256Engine.hpp"
|
||||||
#include "../types/inc/CodepointWidthDetector.hpp"
|
#include "../types/inc/CodepointWidthDetector.hpp"
|
||||||
#include "../types/inc/utils.hpp"
|
#include "../types/inc/utils.hpp"
|
||||||
#include "handle.h" // LockConsole
|
|
||||||
#include "input.h" // ProcessCtrlEvents
|
|
||||||
#include "output.h" // CloseConsoleProcessState
|
|
||||||
|
|
||||||
using namespace Microsoft::Console;
|
using namespace Microsoft::Console;
|
||||||
using namespace Microsoft::Console::Render;
|
using namespace Microsoft::Console::Render;
|
||||||
@ -24,48 +21,10 @@ using namespace Microsoft::Console::Interactivity;
|
|||||||
|
|
||||||
VtIo::VtIo() :
|
VtIo::VtIo() :
|
||||||
_initialized(false),
|
_initialized(false),
|
||||||
_lookingForCursorPosition(false),
|
_lookingForCursorPosition(false)
|
||||||
_IoMode(VtIoMode::INVALID)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// Routine Description:
|
|
||||||
// Tries to get the VtIoMode from the given string. If it's not one of the
|
|
||||||
// *_STRING constants in VtIoMode.hpp, then it returns E_INVALIDARG.
|
|
||||||
// Arguments:
|
|
||||||
// VtIoMode: A string containing the console's requested VT mode. This can be
|
|
||||||
// any of the strings in VtIoModes.hpp
|
|
||||||
// pIoMode: receives the VtIoMode that the string represents if it's a valid
|
|
||||||
// IO mode string
|
|
||||||
// Return Value:
|
|
||||||
// S_OK if we parsed the string successfully, otherwise E_INVALIDARG indicating failure.
|
|
||||||
[[nodiscard]] HRESULT VtIo::ParseIoMode(const std::wstring& VtMode, _Out_ VtIoMode& ioMode)
|
|
||||||
{
|
|
||||||
ioMode = VtIoMode::INVALID;
|
|
||||||
|
|
||||||
if (VtMode == XTERM_256_STRING)
|
|
||||||
{
|
|
||||||
ioMode = VtIoMode::XTERM_256;
|
|
||||||
}
|
|
||||||
else if (VtMode == XTERM_STRING)
|
|
||||||
{
|
|
||||||
ioMode = VtIoMode::XTERM;
|
|
||||||
}
|
|
||||||
else if (VtMode == XTERM_ASCII_STRING)
|
|
||||||
{
|
|
||||||
ioMode = VtIoMode::XTERM_ASCII;
|
|
||||||
}
|
|
||||||
else if (VtMode == DEFAULT_STRING)
|
|
||||||
{
|
|
||||||
ioMode = VtIoMode::XTERM_256;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return E_INVALIDARG;
|
|
||||||
}
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
[[nodiscard]] HRESULT VtIo::Initialize(const ConsoleArguments* const pArgs)
|
[[nodiscard]] HRESULT VtIo::Initialize(const ConsoleArguments* const pArgs)
|
||||||
{
|
{
|
||||||
_lookingForCursorPosition = pArgs->GetInheritCursor();
|
_lookingForCursorPosition = pArgs->GetInheritCursor();
|
||||||
@ -96,7 +55,7 @@ VtIo::VtIo() :
|
|||||||
CodepointWidthDetector::Singleton().Reset(mode);
|
CodepointWidthDetector::Singleton().Reset(mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
return _Initialize(pArgs->GetVtInHandle(), pArgs->GetVtOutHandle(), pArgs->GetVtMode(), pArgs->GetSignalHandle());
|
return _Initialize(pArgs->GetVtInHandle(), pArgs->GetVtOutHandle(), pArgs->GetSignalHandle());
|
||||||
}
|
}
|
||||||
// Didn't need to initialize if we didn't have VT stuff. It's still OK, but report we did nothing.
|
// Didn't need to initialize if we didn't have VT stuff. It's still OK, but report we did nothing.
|
||||||
else
|
else
|
||||||
@ -116,8 +75,6 @@ VtIo::VtIo() :
|
|||||||
// input events.
|
// input events.
|
||||||
// OutHandle: a valid file handle. The console
|
// OutHandle: a valid file handle. The console
|
||||||
// will be "rendered" to this pipe using VT sequences
|
// will be "rendered" to this pipe using VT sequences
|
||||||
// VtIoMode: A string containing the console's requested VT mode. This can be
|
|
||||||
// any of the strings in VtIoModes.hpp
|
|
||||||
// SignalHandle: an optional file handle that will be used to send signals into the console.
|
// SignalHandle: an optional file handle that will be used to send signals into the console.
|
||||||
// This represents the ability to send signals to a *nix tty/pty.
|
// This represents the ability to send signals to a *nix tty/pty.
|
||||||
// Return Value:
|
// Return Value:
|
||||||
@ -125,13 +82,10 @@ VtIo::VtIo() :
|
|||||||
// indicating failure.
|
// indicating failure.
|
||||||
[[nodiscard]] HRESULT VtIo::_Initialize(const HANDLE InHandle,
|
[[nodiscard]] HRESULT VtIo::_Initialize(const HANDLE InHandle,
|
||||||
const HANDLE OutHandle,
|
const HANDLE OutHandle,
|
||||||
const std::wstring& VtMode,
|
|
||||||
_In_opt_ const HANDLE SignalHandle)
|
_In_opt_ const HANDLE SignalHandle)
|
||||||
{
|
{
|
||||||
FAIL_FAST_IF_MSG(_initialized, "Someone attempted to double-_Initialize VtIo");
|
FAIL_FAST_IF_MSG(_initialized, "Someone attempted to double-_Initialize VtIo");
|
||||||
|
|
||||||
RETURN_IF_FAILED(ParseIoMode(VtMode, _IoMode));
|
|
||||||
|
|
||||||
_hInput.reset(InHandle);
|
_hInput.reset(InHandle);
|
||||||
_hOutput.reset(OutHandle);
|
_hOutput.reset(OutHandle);
|
||||||
_hSignal.reset(SignalHandle);
|
_hSignal.reset(SignalHandle);
|
||||||
@ -174,34 +128,11 @@ VtIo::VtIo() :
|
|||||||
if (IsValidHandle(_hOutput.get()))
|
if (IsValidHandle(_hOutput.get()))
|
||||||
{
|
{
|
||||||
auto initialViewport = Viewport::FromDimensions({ 0, 0 }, gci.GetWindowSize());
|
auto initialViewport = Viewport::FromDimensions({ 0, 0 }, gci.GetWindowSize());
|
||||||
switch (_IoMode)
|
|
||||||
{
|
auto xterm256Engine = std::make_unique<Xterm256Engine>(std::move(_hOutput),
|
||||||
case VtIoMode::XTERM_256:
|
initialViewport);
|
||||||
{
|
_pVtRenderEngine = std::move(xterm256Engine);
|
||||||
auto xterm256Engine = std::make_unique<Xterm256Engine>(std::move(_hOutput),
|
|
||||||
initialViewport);
|
|
||||||
_pVtRenderEngine = std::move(xterm256Engine);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case VtIoMode::XTERM:
|
|
||||||
{
|
|
||||||
_pVtRenderEngine = std::make_unique<XtermEngine>(std::move(_hOutput),
|
|
||||||
initialViewport,
|
|
||||||
false);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case VtIoMode::XTERM_ASCII:
|
|
||||||
{
|
|
||||||
_pVtRenderEngine = std::make_unique<XtermEngine>(std::move(_hOutput),
|
|
||||||
initialViewport,
|
|
||||||
true);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
{
|
|
||||||
return E_FAIL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (_pVtRenderEngine)
|
if (_pVtRenderEngine)
|
||||||
{
|
{
|
||||||
_pVtRenderEngine->SetTerminalOwner(this);
|
_pVtRenderEngine->SetTerminalOwner(this);
|
||||||
|
|||||||
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../inc/VtIoModes.hpp"
|
|
||||||
#include "../renderer/vt/vtrenderer.hpp"
|
#include "../renderer/vt/vtrenderer.hpp"
|
||||||
#include "VtInputThread.hpp"
|
#include "VtInputThread.hpp"
|
||||||
#include "PtySignalInputThread.hpp"
|
#include "PtySignalInputThread.hpp"
|
||||||
@ -34,7 +33,6 @@ namespace Microsoft::Console::VirtualTerminal
|
|||||||
|
|
||||||
[[nodiscard]] HRESULT StartIfNeeded();
|
[[nodiscard]] HRESULT StartIfNeeded();
|
||||||
|
|
||||||
[[nodiscard]] static HRESULT ParseIoMode(const std::wstring& VtMode, _Out_ VtIoMode& ioMode);
|
|
||||||
[[nodiscard]] HRESULT SuppressResizeRepaint();
|
[[nodiscard]] HRESULT SuppressResizeRepaint();
|
||||||
[[nodiscard]] HRESULT SetCursorPosition(const til::point coordCursor);
|
[[nodiscard]] HRESULT SetCursorPosition(const til::point coordCursor);
|
||||||
[[nodiscard]] HRESULT SwitchScreenBuffer(const bool useAltBuffer);
|
[[nodiscard]] HRESULT SwitchScreenBuffer(const bool useAltBuffer);
|
||||||
@ -63,7 +61,6 @@ namespace Microsoft::Console::VirtualTerminal
|
|||||||
wil::unique_hfile _hOutput;
|
wil::unique_hfile _hOutput;
|
||||||
// After CreateAndStartSignalThread is called, this will be invalid.
|
// After CreateAndStartSignalThread is called, this will be invalid.
|
||||||
wil::unique_hfile _hSignal;
|
wil::unique_hfile _hSignal;
|
||||||
VtIoMode _IoMode;
|
|
||||||
|
|
||||||
bool _initialized;
|
bool _initialized;
|
||||||
|
|
||||||
@ -76,7 +73,7 @@ namespace Microsoft::Console::VirtualTerminal
|
|||||||
std::unique_ptr<Microsoft::Console::VtInputThread> _pVtInputThread;
|
std::unique_ptr<Microsoft::Console::VtInputThread> _pVtInputThread;
|
||||||
std::unique_ptr<Microsoft::Console::PtySignalInputThread> _pPtySignalInputThread;
|
std::unique_ptr<Microsoft::Console::PtySignalInputThread> _pPtySignalInputThread;
|
||||||
|
|
||||||
[[nodiscard]] HRESULT _Initialize(const HANDLE InHandle, const HANDLE OutHandle, const std::wstring& VtMode, _In_opt_ const HANDLE SignalHandle);
|
[[nodiscard]] HRESULT _Initialize(const HANDLE InHandle, const HANDLE OutHandle, _In_opt_ const HANDLE SignalHandle);
|
||||||
|
|
||||||
#ifdef UNIT_TESTING
|
#ifdef UNIT_TESTING
|
||||||
friend class VtIoTests;
|
friend class VtIoTests;
|
||||||
|
|||||||
@ -73,7 +73,6 @@ void ConsoleArgumentsTests::ArgSplittingTests()
|
|||||||
L"this is the commandline", // clientCommandLine,
|
L"this is the commandline", // clientCommandLine,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -95,7 +94,6 @@ void ConsoleArgumentsTests::ArgSplittingTests()
|
|||||||
L"\"this is the commandline\"", // clientCommandLine
|
L"\"this is the commandline\"", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -117,7 +115,6 @@ void ConsoleArgumentsTests::ArgSplittingTests()
|
|||||||
L"\"--vtmode bar this is the commandline\"", // clientCommandLine
|
L"\"--vtmode bar this is the commandline\"", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -139,7 +136,6 @@ void ConsoleArgumentsTests::ArgSplittingTests()
|
|||||||
L"this is the commandline", // clientCommandLine
|
L"this is the commandline", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -152,7 +148,7 @@ void ConsoleArgumentsTests::ArgSplittingTests()
|
|||||||
false), // runAsComServer
|
false), // runAsComServer
|
||||||
true); // successful parse?
|
true); // successful parse?
|
||||||
|
|
||||||
commandline = L"conhost.exe --headless\t--vtmode\txterm\tthis\tis\tthe\tcommandline";
|
commandline = L"conhost.exe --headless\tthis\tis\tthe\tcommandline";
|
||||||
ArgTestsRunner(L"#5\ttab\tdelimit",
|
ArgTestsRunner(L"#5\ttab\tdelimit",
|
||||||
commandline,
|
commandline,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
@ -161,7 +157,6 @@ void ConsoleArgumentsTests::ArgSplittingTests()
|
|||||||
L"this is the commandline", // clientCommandLine
|
L"this is the commandline", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"xterm", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -183,7 +178,6 @@ void ConsoleArgumentsTests::ArgSplittingTests()
|
|||||||
L"--headless\\ foo\\ --outpipe\\ bar\\ this\\ is\\ the\\ commandline", // clientCommandLine
|
L"--headless\\ foo\\ --outpipe\\ bar\\ this\\ is\\ the\\ commandline", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -205,29 +199,6 @@ void ConsoleArgumentsTests::ArgSplittingTests()
|
|||||||
L"--headless\\ foo\\ --outpipe\\ bar\\ this\\ is\\ the\\ commandline", // clientCommandLine
|
L"--headless\\ foo\\ --outpipe\\ bar\\ this\\ is\\ the\\ commandline", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
|
||||||
0, // height
|
|
||||||
false, // forceV1
|
|
||||||
false, // forceNoHandoff
|
|
||||||
false, // headless
|
|
||||||
true, // createServerHandle
|
|
||||||
0, // serverHandle
|
|
||||||
0, // signalHandle
|
|
||||||
false, // inheritCursor
|
|
||||||
false), // runAsComServer
|
|
||||||
true); // successful parse?
|
|
||||||
|
|
||||||
commandline = L"conhost.exe --vtmode a\\\\\\\\\"b c\" d e";
|
|
||||||
ArgTestsRunner(L"#8 Combo of backslashes and quotes from msdn",
|
|
||||||
commandline,
|
|
||||||
INVALID_HANDLE_VALUE,
|
|
||||||
INVALID_HANDLE_VALUE,
|
|
||||||
ConsoleArguments(commandline,
|
|
||||||
L"d e", // clientCommandLine
|
|
||||||
INVALID_HANDLE_VALUE,
|
|
||||||
INVALID_HANDLE_VALUE,
|
|
||||||
L"a\\\\b c", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -249,7 +220,6 @@ void ConsoleArgumentsTests::ArgSplittingTests()
|
|||||||
L"this is the commandline", // clientCommandLine
|
L"this is the commandline", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -276,7 +246,6 @@ void ConsoleArgumentsTests::ClientCommandlineTests()
|
|||||||
L"foo", // clientCommandLine
|
L"foo", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -298,7 +267,6 @@ void ConsoleArgumentsTests::ClientCommandlineTests()
|
|||||||
L"foo", // clientCommandLine
|
L"foo", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -320,7 +288,6 @@ void ConsoleArgumentsTests::ClientCommandlineTests()
|
|||||||
L"foo -- bar", // clientCommandLine
|
L"foo -- bar", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -333,7 +300,7 @@ void ConsoleArgumentsTests::ClientCommandlineTests()
|
|||||||
false), // runAsComServer
|
false), // runAsComServer
|
||||||
true); // successful parse?
|
true); // successful parse?
|
||||||
|
|
||||||
commandline = L"conhost.exe --vtmode foo foo -- bar";
|
commandline = L"conhost.exe foo -- bar";
|
||||||
ArgTestsRunner(L"#4 Check that a implicit commandline with other expected args is treated as a whole client commandline (2)",
|
ArgTestsRunner(L"#4 Check that a implicit commandline with other expected args is treated as a whole client commandline (2)",
|
||||||
commandline,
|
commandline,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
@ -342,7 +309,6 @@ void ConsoleArgumentsTests::ClientCommandlineTests()
|
|||||||
L"foo -- bar", // clientCommandLine
|
L"foo -- bar", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"foo", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -364,7 +330,6 @@ void ConsoleArgumentsTests::ClientCommandlineTests()
|
|||||||
L"console --vtmode foo foo -- bar", // clientCommandLine
|
L"console --vtmode foo foo -- bar", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -386,7 +351,6 @@ void ConsoleArgumentsTests::ClientCommandlineTests()
|
|||||||
L"console --vtmode foo --outpipe foo -- bar", // clientCommandLine
|
L"console --vtmode foo --outpipe foo -- bar", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -399,7 +363,7 @@ void ConsoleArgumentsTests::ClientCommandlineTests()
|
|||||||
false), // runAsComServer
|
false), // runAsComServer
|
||||||
true); // successful parse?
|
true); // successful parse?
|
||||||
|
|
||||||
commandline = L"conhost.exe --vtmode foo -- --outpipe foo bar";
|
commandline = L"conhost.exe -- --outpipe foo bar";
|
||||||
ArgTestsRunner(L"#7 Check splitting vt pipes across the explicit commandline does not pull both pipe names out",
|
ArgTestsRunner(L"#7 Check splitting vt pipes across the explicit commandline does not pull both pipe names out",
|
||||||
commandline,
|
commandline,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
@ -408,7 +372,6 @@ void ConsoleArgumentsTests::ClientCommandlineTests()
|
|||||||
L"--outpipe foo bar", // clientCommandLine
|
L"--outpipe foo bar", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"foo", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -421,28 +384,6 @@ void ConsoleArgumentsTests::ClientCommandlineTests()
|
|||||||
false), // runAsComServer
|
false), // runAsComServer
|
||||||
true); // successful parse?
|
true); // successful parse?
|
||||||
|
|
||||||
commandline = L"conhost.exe --vtmode -- --headless bar";
|
|
||||||
ArgTestsRunner(L"#8 Let -- be used as a value of a parameter",
|
|
||||||
commandline,
|
|
||||||
INVALID_HANDLE_VALUE,
|
|
||||||
INVALID_HANDLE_VALUE,
|
|
||||||
ConsoleArguments(commandline,
|
|
||||||
L"bar", // clientCommandLine
|
|
||||||
INVALID_HANDLE_VALUE,
|
|
||||||
INVALID_HANDLE_VALUE,
|
|
||||||
L"--", // vtMode
|
|
||||||
0, // width
|
|
||||||
0, // height
|
|
||||||
false, // forceV1
|
|
||||||
false, // forceNoHandoff
|
|
||||||
true, // headless
|
|
||||||
true, // createServerHandle
|
|
||||||
0, // serverHandle
|
|
||||||
0, // signalHandle
|
|
||||||
false, // inheritCursor
|
|
||||||
false), // runAsComServer
|
|
||||||
true); // successful parse?
|
|
||||||
|
|
||||||
commandline = L"conhost.exe --";
|
commandline = L"conhost.exe --";
|
||||||
ArgTestsRunner(L"#9 -- by itself does nothing successfully",
|
ArgTestsRunner(L"#9 -- by itself does nothing successfully",
|
||||||
commandline,
|
commandline,
|
||||||
@ -452,7 +393,6 @@ void ConsoleArgumentsTests::ClientCommandlineTests()
|
|||||||
L"", // clientCommandLine
|
L"", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -474,7 +414,6 @@ void ConsoleArgumentsTests::ClientCommandlineTests()
|
|||||||
L"", // clientCommandLine
|
L"", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -501,7 +440,6 @@ void ConsoleArgumentsTests::LegacyFormatsTests()
|
|||||||
L"", // clientCommandLine
|
L"", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -523,7 +461,6 @@ void ConsoleArgumentsTests::LegacyFormatsTests()
|
|||||||
L"", // clientCommandLine
|
L"", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -545,7 +482,6 @@ void ConsoleArgumentsTests::LegacyFormatsTests()
|
|||||||
L"", // clientCommandLine
|
L"", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -567,7 +503,6 @@ void ConsoleArgumentsTests::LegacyFormatsTests()
|
|||||||
L"", // clientCommandLine
|
L"", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -589,7 +524,6 @@ void ConsoleArgumentsTests::LegacyFormatsTests()
|
|||||||
L"", // clientCommandLine
|
L"", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -611,7 +545,6 @@ void ConsoleArgumentsTests::LegacyFormatsTests()
|
|||||||
L"", // clientCommandLine
|
L"", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -633,7 +566,6 @@ void ConsoleArgumentsTests::LegacyFormatsTests()
|
|||||||
L"", // clientCommandLine
|
L"", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
true, // forceV1
|
true, // forceV1
|
||||||
@ -655,7 +587,6 @@ void ConsoleArgumentsTests::LegacyFormatsTests()
|
|||||||
L"", // clientCommandLine
|
L"", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
true, // forceV1
|
true, // forceV1
|
||||||
@ -677,7 +608,6 @@ void ConsoleArgumentsTests::LegacyFormatsTests()
|
|||||||
L"", // clientCommandLine
|
L"", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -699,7 +629,6 @@ void ConsoleArgumentsTests::LegacyFormatsTests()
|
|||||||
L"", // clientCommandLine
|
L"", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -750,29 +679,6 @@ void ConsoleArgumentsTests::CombineVtPipeHandleTests()
|
|||||||
L"", // clientCommandLine
|
L"", // clientCommandLine
|
||||||
hInSample,
|
hInSample,
|
||||||
hOutSample,
|
hOutSample,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
|
||||||
0, // height
|
|
||||||
false, // forceV1
|
|
||||||
false, // forceNoHandoff
|
|
||||||
false, // headless
|
|
||||||
true, // createServerHandle
|
|
||||||
0ul, // serverHandle
|
|
||||||
0, // signalHandle
|
|
||||||
false, // inheritCursor
|
|
||||||
false), // runAsComServer
|
|
||||||
true); // successful parse?
|
|
||||||
|
|
||||||
commandline = L"conhost.exe --vtmode xterm-256color";
|
|
||||||
ArgTestsRunner(L"#2 Check that handles with mode is OK",
|
|
||||||
commandline,
|
|
||||||
hInSample,
|
|
||||||
hOutSample,
|
|
||||||
ConsoleArguments(commandline,
|
|
||||||
L"", // clientCommandLine
|
|
||||||
hInSample,
|
|
||||||
hOutSample,
|
|
||||||
L"xterm-256color", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -809,7 +715,6 @@ void ConsoleArgumentsTests::InitialSizeTests()
|
|||||||
L"", // clientCommandLine
|
L"", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
120, // width
|
120, // width
|
||||||
30, // height
|
30, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -831,7 +736,6 @@ void ConsoleArgumentsTests::InitialSizeTests()
|
|||||||
L"", // clientCommandLine
|
L"", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
120, // width
|
120, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -853,7 +757,6 @@ void ConsoleArgumentsTests::InitialSizeTests()
|
|||||||
L"", // clientCommandLine
|
L"", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
30, // height
|
30, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -875,7 +778,6 @@ void ConsoleArgumentsTests::InitialSizeTests()
|
|||||||
L"", // clientCommandLine
|
L"", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -897,7 +799,6 @@ void ConsoleArgumentsTests::InitialSizeTests()
|
|||||||
L"", // clientCommandLine
|
L"", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
-1, // width
|
-1, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -919,7 +820,6 @@ void ConsoleArgumentsTests::InitialSizeTests()
|
|||||||
L"", // clientCommandLine
|
L"", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -941,7 +841,6 @@ void ConsoleArgumentsTests::InitialSizeTests()
|
|||||||
L"", // clientCommandLine
|
L"", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -963,7 +862,6 @@ void ConsoleArgumentsTests::InitialSizeTests()
|
|||||||
L"", // clientCommandLine
|
L"", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -990,7 +888,6 @@ void ConsoleArgumentsTests::HeadlessArgTests()
|
|||||||
L"", // clientCommandLine
|
L"", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -1012,7 +909,6 @@ void ConsoleArgumentsTests::HeadlessArgTests()
|
|||||||
L"", // clientCommandLine
|
L"", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -1034,7 +930,6 @@ void ConsoleArgumentsTests::HeadlessArgTests()
|
|||||||
L"", // clientCommandLine
|
L"", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -1056,7 +951,6 @@ void ConsoleArgumentsTests::HeadlessArgTests()
|
|||||||
L"foo.exe --headless", // clientCommandLine
|
L"foo.exe --headless", // clientCommandLine
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
INVALID_HANDLE_VALUE,
|
INVALID_HANDLE_VALUE,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -1087,7 +981,6 @@ void ConsoleArgumentsTests::SignalHandleTests()
|
|||||||
L"",
|
L"",
|
||||||
hInSample,
|
hInSample,
|
||||||
hOutSample,
|
hOutSample,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -1109,7 +1002,6 @@ void ConsoleArgumentsTests::SignalHandleTests()
|
|||||||
L"",
|
L"",
|
||||||
hInSample,
|
hInSample,
|
||||||
hOutSample,
|
hOutSample,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -1131,7 +1023,6 @@ void ConsoleArgumentsTests::SignalHandleTests()
|
|||||||
L"",
|
L"",
|
||||||
hInSample,
|
hInSample,
|
||||||
hOutSample,
|
hOutSample,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -1162,7 +1053,6 @@ void ConsoleArgumentsTests::FeatureArgTests()
|
|||||||
L"",
|
L"",
|
||||||
hInSample,
|
hInSample,
|
||||||
hOutSample,
|
hOutSample,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -1183,7 +1073,6 @@ void ConsoleArgumentsTests::FeatureArgTests()
|
|||||||
L"",
|
L"",
|
||||||
hInSample,
|
hInSample,
|
||||||
hOutSample,
|
hOutSample,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -1205,7 +1094,6 @@ void ConsoleArgumentsTests::FeatureArgTests()
|
|||||||
L"",
|
L"",
|
||||||
hInSample,
|
hInSample,
|
||||||
hOutSample,
|
hOutSample,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -1227,7 +1115,6 @@ void ConsoleArgumentsTests::FeatureArgTests()
|
|||||||
L"",
|
L"",
|
||||||
hInSample,
|
hInSample,
|
||||||
hOutSample,
|
hOutSample,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -1249,7 +1136,6 @@ void ConsoleArgumentsTests::FeatureArgTests()
|
|||||||
L"",
|
L"",
|
||||||
hInSample,
|
hInSample,
|
||||||
hOutSample,
|
hOutSample,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
@ -1271,7 +1157,6 @@ void ConsoleArgumentsTests::FeatureArgTests()
|
|||||||
L"",
|
L"",
|
||||||
hInSample,
|
hInSample,
|
||||||
hOutSample,
|
hOutSample,
|
||||||
L"", // vtMode
|
|
||||||
0, // width
|
0, // width
|
||||||
0, // height
|
0, // height
|
||||||
false, // forceV1
|
false, // forceV1
|
||||||
|
|||||||
@ -25,7 +25,6 @@ class Microsoft::Console::VirtualTerminal::VtIoTests
|
|||||||
|
|
||||||
// General Tests:
|
// General Tests:
|
||||||
TEST_METHOD(NoOpStartTest);
|
TEST_METHOD(NoOpStartTest);
|
||||||
TEST_METHOD(ModeParsingTest);
|
|
||||||
|
|
||||||
TEST_METHOD(DtorTestJustEngine);
|
TEST_METHOD(DtorTestJustEngine);
|
||||||
TEST_METHOD(DtorTestDeleteVtio);
|
TEST_METHOD(DtorTestDeleteVtio);
|
||||||
@ -51,25 +50,6 @@ void VtIoTests::NoOpStartTest()
|
|||||||
VERIFY_SUCCEEDED(vtio.StartIfNeeded());
|
VERIFY_SUCCEEDED(vtio.StartIfNeeded());
|
||||||
}
|
}
|
||||||
|
|
||||||
void VtIoTests::ModeParsingTest()
|
|
||||||
{
|
|
||||||
VtIoMode mode;
|
|
||||||
VERIFY_SUCCEEDED(VtIo::ParseIoMode(L"xterm", mode));
|
|
||||||
VERIFY_ARE_EQUAL(mode, VtIoMode::XTERM);
|
|
||||||
|
|
||||||
VERIFY_SUCCEEDED(VtIo::ParseIoMode(L"xterm-256color", mode));
|
|
||||||
VERIFY_ARE_EQUAL(mode, VtIoMode::XTERM_256);
|
|
||||||
|
|
||||||
VERIFY_SUCCEEDED(VtIo::ParseIoMode(L"xterm-ascii", mode));
|
|
||||||
VERIFY_ARE_EQUAL(mode, VtIoMode::XTERM_ASCII);
|
|
||||||
|
|
||||||
VERIFY_SUCCEEDED(VtIo::ParseIoMode(L"", mode));
|
|
||||||
VERIFY_ARE_EQUAL(mode, VtIoMode::XTERM_256);
|
|
||||||
|
|
||||||
VERIFY_FAILED(VtIo::ParseIoMode(L"garbage", mode));
|
|
||||||
VERIFY_ARE_EQUAL(mode, VtIoMode::INVALID);
|
|
||||||
}
|
|
||||||
|
|
||||||
Viewport SetUpViewport()
|
Viewport SetUpViewport()
|
||||||
{
|
{
|
||||||
til::inclusive_rect view;
|
til::inclusive_rect view;
|
||||||
@ -445,7 +425,7 @@ void VtIoTests::BasicAnonymousPipeOpeningWithSignalChannelTest()
|
|||||||
VtIo vtio;
|
VtIo vtio;
|
||||||
VERIFY_IS_FALSE(vtio.IsUsingVt());
|
VERIFY_IS_FALSE(vtio.IsUsingVt());
|
||||||
VERIFY_ARE_EQUAL(nullptr, vtio._pPtySignalInputThread);
|
VERIFY_ARE_EQUAL(nullptr, vtio._pPtySignalInputThread);
|
||||||
VERIFY_SUCCEEDED(vtio._Initialize(inPipeReadSide.release(), outPipeWriteSide.release(), L"", signalPipeReadSide.release()));
|
VERIFY_SUCCEEDED(vtio._Initialize(inPipeReadSide.release(), outPipeWriteSide.release(), signalPipeReadSide.release()));
|
||||||
VERIFY_SUCCEEDED(vtio.CreateAndStartSignalThread());
|
VERIFY_SUCCEEDED(vtio.CreateAndStartSignalThread());
|
||||||
VERIFY_SUCCEEDED(vtio.CreateIoHandlers());
|
VERIFY_SUCCEEDED(vtio.CreateIoHandlers());
|
||||||
VERIFY_IS_TRUE(vtio.IsUsingVt());
|
VERIFY_IS_TRUE(vtio.IsUsingVt());
|
||||||
|
|||||||
@ -1,17 +0,0 @@
|
|||||||
// Copyright (c) Microsoft Corporation.
|
|
||||||
// Licensed under the MIT license.
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
enum class VtIoMode
|
|
||||||
{
|
|
||||||
INVALID,
|
|
||||||
XTERM,
|
|
||||||
XTERM_256,
|
|
||||||
XTERM_ASCII
|
|
||||||
};
|
|
||||||
|
|
||||||
const wchar_t* const XTERM_STRING = L"xterm";
|
|
||||||
const wchar_t* const XTERM_256_STRING = L"xterm-256color";
|
|
||||||
const wchar_t* const XTERM_ASCII_STRING = L"xterm-ascii";
|
|
||||||
const wchar_t* const DEFAULT_STRING = L"";
|
|
||||||
Loading…
x
Reference in New Issue
Block a user