daignosing unit test fail in action

This commit is contained in:
Tigger Kindel
2023-08-12 09:50:27 -06:00
committed by Tig
parent fa2732ec51
commit 5d77dd7176
2 changed files with 7 additions and 5 deletions

View File

@@ -625,7 +625,7 @@ internal class CursesDriver : ConsoleDriver {
} catch (Exception e) {
_window = null;
_runningUnitTests = true;
Debug.WriteLine ($"Curses failed to initialize. Assuming Unit Tests. The exception is: {e.Message}");
throw new InvalidProgramException ($"Curses failed to initialize. Assuming Unit Tests. The exception is: {e.Message}");
}
if (!_runningUnitTests) {

View File

@@ -611,20 +611,22 @@ internal class NetDriver : ConsoleDriver {
TerminalResized = terminalResized;
try {
// In unit tests, this will throw
Console.TreatControlCAsInput = true;
Cols = Console.WindowWidth;
Rows = Console.WindowHeight;
//Enable alternative screen buffer.
Console.Out.Write (EscSeqUtils.CSI_SaveCursorAndActivateAltBufferNoBackscroll);
//Set cursor key to application.
Console.Out.Write (EscSeqUtils.CSI_HideCursor);
Console.TreatControlCAsInput = true;
Cols = Console.WindowWidth;
Rows = Console.WindowHeight;
} catch (IOException) {
// We are being run in an environment that does not support a console
// such as a unit test, or a pipe.
_runningUnitTests = true;
throw new InvalidProgramException ();
Cols = 80;
Rows = 24;
}