[*] Linux no go. Interim NT update.
This commit is contained in:
parent
5974023ec2
commit
ba4fd61c07
@ -1 +1 @@
|
||||
Subproject commit f6025d08cdc85911579c401cb85d49621609546e
|
||||
Subproject commit 8712c9a621bce3930245b42a6bf678cb4e9bd3e7
|
@ -1 +1 @@
|
||||
Subproject commit ea336826dd53c72c8caf075d0412546ac363d0e1
|
||||
Subproject commit 4fb09a68e921f3cf3ecd759787ff4fdc69964cec
|
@ -1 +1 @@
|
||||
Subproject commit 23e922a39679482d3f17fedf7ea393b7f595b723
|
||||
Subproject commit 97938fcaeb4f0e1d1f29bff9699c51e7d9091acb
|
@ -1 +1 @@
|
||||
Subproject commit a4e296c86744973cf5212e094d8e7d8b88195f00
|
||||
Subproject commit d551cda998c04c72a0d63bc585c0ad6cac633507
|
@ -8,26 +8,28 @@
|
||||
#include <AuroraRuntime.hpp>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
using namespace AuConsole::ConsoleTTY;
|
||||
|
||||
static void PrintDebug()
|
||||
{
|
||||
AuConsole::TTYFill(' ', AuConsole::EAnsiColor::eBoldMagenta, AuConsole::EAnsiColor::eBoldMagenta);
|
||||
AuConsole::TTYWrite("Hello Red and Green\n", AuConsole::EAnsiColor::eRed, AuConsole::EAnsiColor::eBlue);
|
||||
AuConsole::TTYWrite("To blank\n");
|
||||
AuConsole::TTYMoveY(1);
|
||||
AuConsole::TTYClearLine(AuConsole::EAnsiColor::eBoldMagenta);
|
||||
AuConsole::TTYWrite("Overwritten\n");
|
||||
AuConsole::TTYWrite("Hello Red and Green", AuConsole::EAnsiColor::eRed, AuConsole::EAnsiColor::eBoldGreen);
|
||||
AuConsole::TTYWrite("Hello Bold Red and Green\n", AuConsole::EAnsiColor::eBoldRed, AuConsole::EAnsiColor::eBoldGreen);
|
||||
AuConsole::TTYWrite("Hello Green and Green\n", AuConsole::EAnsiColor::eGreen, AuConsole::EAnsiColor::eBoldGreen);
|
||||
AuConsole::TTYWrite("Hello Bold Green and Blue\n", AuConsole::EAnsiColor::eBoldGreen, AuConsole::EAnsiColor::eBlue);
|
||||
AuConsole::TTYWrite("Hello Yellow and Green\n", AuConsole::EAnsiColor::eYellow, AuConsole::EAnsiColor::eBoldGreen);
|
||||
AuConsole::TTYWrite("Hello Bold Yellow and Green\n", AuConsole::EAnsiColor::eBoldYellow, AuConsole::EAnsiColor::eBoldGreen);
|
||||
AuConsole::TTYWrite("Hello Blue and Green\n", AuConsole::EAnsiColor::eBlue, AuConsole::EAnsiColor::eBoldGreen);
|
||||
AuConsole::TTYWrite("Hello Bold Blue and Green\n", AuConsole::EAnsiColor::eBoldBlue, AuConsole::EAnsiColor::eBoldGreen);
|
||||
AuConsole::TTYWrite("Hello Magenta and Green\n", AuConsole::EAnsiColor::eMagenta, AuConsole::EAnsiColor::eBoldGreen);
|
||||
AuConsole::TTYWrite("Hello Bold Magenta and Green\n", AuConsole::EAnsiColor::eBoldMagenta, AuConsole::EAnsiColor::eBoldGreen);
|
||||
AuConsole::TTYWrite("Hello Cyan and Green\n", AuConsole::EAnsiColor::eCyan, AuConsole::EAnsiColor::eBoldGreen);
|
||||
AuConsole::TTYWrite("Hello Bold Cyan and Green\n", AuConsole::EAnsiColor::eBoldCyan, AuConsole::EAnsiColor::eBoldGreen);
|
||||
TTYFill(' ', AuConsole::EAnsiColor::eBoldMagenta, AuConsole::EAnsiColor::eBoldMagenta);
|
||||
TTYWrite("Hello Red and Green\n", AuConsole::EAnsiColor::eRed, AuConsole::EAnsiColor::eBlue);
|
||||
TTYWrite("To blank\n");
|
||||
TTYMoveY(1);
|
||||
TTYClearLine(AuConsole::EAnsiColor::eBoldMagenta);
|
||||
TTYWrite("Overwritten\n");
|
||||
TTYWrite("Hello Red and Green", AuConsole::EAnsiColor::eRed, AuConsole::EAnsiColor::eBoldGreen);
|
||||
TTYWrite("Hello Bold Red and Green\n", AuConsole::EAnsiColor::eBoldRed, AuConsole::EAnsiColor::eBoldGreen);
|
||||
TTYWrite("Hello Green and Green\n", AuConsole::EAnsiColor::eGreen, AuConsole::EAnsiColor::eBoldGreen);
|
||||
TTYWrite("Hello Bold Green and Blue\n", AuConsole::EAnsiColor::eBoldGreen, AuConsole::EAnsiColor::eBlue);
|
||||
TTYWrite("Hello Yellow and Green\n", AuConsole::EAnsiColor::eYellow, AuConsole::EAnsiColor::eBoldGreen);
|
||||
TTYWrite("Hello Bold Yellow and Green\n", AuConsole::EAnsiColor::eBoldYellow, AuConsole::EAnsiColor::eBoldGreen);
|
||||
TTYWrite("Hello Blue and Green\n", AuConsole::EAnsiColor::eBlue, AuConsole::EAnsiColor::eBoldGreen);
|
||||
TTYWrite("Hello Bold Blue and Green\n", AuConsole::EAnsiColor::eBoldBlue, AuConsole::EAnsiColor::eBoldGreen);
|
||||
TTYWrite("Hello Magenta and Green\n", AuConsole::EAnsiColor::eMagenta, AuConsole::EAnsiColor::eBoldGreen);
|
||||
TTYWrite("Hello Bold Magenta and Green\n", AuConsole::EAnsiColor::eBoldMagenta, AuConsole::EAnsiColor::eBoldGreen);
|
||||
TTYWrite("Hello Cyan and Green\n", AuConsole::EAnsiColor::eCyan, AuConsole::EAnsiColor::eBoldGreen);
|
||||
TTYWrite("Hello Bold Cyan and Green\n", AuConsole::EAnsiColor::eBoldCyan, AuConsole::EAnsiColor::eBoldGreen);
|
||||
}
|
||||
|
||||
static void ReadStdInNonBlocking()
|
||||
|
74
Tests/Public/23. Hello Shell Console/Main.cpp
Normal file
74
Tests/Public/23. Hello Shell Console/Main.cpp
Normal file
@ -0,0 +1,74 @@
|
||||
/***
|
||||
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
||||
|
||||
File: Main.cpp
|
||||
Date: 2022-2-18
|
||||
Author: Reece
|
||||
***/
|
||||
#include <AuroraRuntime.hpp>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
using namespace AuConsole::ConsoleTTY;
|
||||
|
||||
#define ASYNC
|
||||
|
||||
void RunTests()
|
||||
{
|
||||
Aurora::RuntimeStartInfo info;
|
||||
#if defined(ASYNC)
|
||||
info.async.enableSchedularThread = true;
|
||||
info.async.schedularFrequency = 2;// 1000;
|
||||
info.async.enableSysPumpFreqnecy = true;
|
||||
#else
|
||||
info.async.enableSchedularThread = false;
|
||||
#endif
|
||||
info.console.fio.enableLogging = false;
|
||||
|
||||
Aurora::RuntimeStart(info);
|
||||
|
||||
GetTTYConsole()->Start();
|
||||
GetTTYConsole()->SetHeaderBorderTitle("Hello");
|
||||
GetTTYConsole()->SetHeaderAlignment(ETTYAlign::eCenter);
|
||||
|
||||
GetTTYConsole()->SetHeader(fmt::format("Aurora Shell: {}", __DATE__));
|
||||
|
||||
GetTTYConsole()->SetSubHeader("https://reece.sx");
|
||||
GetTTYConsole()->SetSubheaderAlignment(ETTYAlign::eRight);
|
||||
|
||||
|
||||
#if !defined(ASYNC)
|
||||
|
||||
while (true)
|
||||
{
|
||||
AuThreading::Sleep(10);
|
||||
Aurora::RuntimeSysPump();
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
auto app = AuAsync::GetAsyncApp();
|
||||
|
||||
struct LineWriter : AuAsync::IWorkItemHandler
|
||||
{
|
||||
int ticks = 0;
|
||||
|
||||
void DispatchFrame(ProcessInfo &info) override
|
||||
{
|
||||
|
||||
info = AuAsync::ETickType::eSchedule;
|
||||
info.reschedMs = 20 + AuMin((this->ticks++) * 50, 1'000);
|
||||
|
||||
AuLogInfo("Hello {}", ticks);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
app->Start();
|
||||
|
||||
app->NewWorkItem({}, AuMakeShared<LineWriter>())->Dispatch();
|
||||
|
||||
app->Run();
|
||||
|
||||
#endif
|
||||
|
||||
}
|
@ -101,20 +101,9 @@ static void TestBasicCompression(AuCompression::ECompressionType type)
|
||||
AuCompression::CompressionInfo info;
|
||||
|
||||
info.type = type;
|
||||
pipe.inPipe = [&](void *buf, AuUInt len) -> AuUInt
|
||||
{
|
||||
AuUInt len2 = len;
|
||||
if (reader.Read(AuMemory::MemoryViewStreamWrite(buf, len2)) != AuIO::EStreamError::eErrorNone)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
return len2;
|
||||
};
|
||||
|
||||
pipe.writePipe = [&](const void *buf, AuUInt len)
|
||||
{
|
||||
compressed.Write(AuMemory::MemoryViewStreamRead(buf, len));
|
||||
};
|
||||
pipe.inPipe = AuUnsafeRaiiToShared(&reader);
|
||||
pipe.writePipe = AuUnsafeRaiiToShared(&compressed);
|
||||
|
||||
info.compressionLevel = 4;
|
||||
ASSERT_TRUE(AuCompression::Compress(pipe, info));
|
||||
}
|
||||
@ -125,20 +114,8 @@ static void TestBasicCompression(AuCompression::ECompressionType type)
|
||||
AuIO::Buffered::BlobReader reader(compressed.GetBuffer());
|
||||
AuCompression::CompressionPipe pipe;
|
||||
|
||||
pipe.inPipe = [&](void *buf, AuUInt len) -> AuUInt
|
||||
{
|
||||
AuUInt len2 = len;
|
||||
if (reader.Read(AuMemory::MemoryViewStreamWrite(buf, len2)) != AuIO::EStreamError::eErrorNone)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
return len2;
|
||||
};
|
||||
|
||||
pipe.writePipe = [&](const void *buf, AuUInt len)
|
||||
{
|
||||
decompressed.Write(AuMemory::MemoryViewStreamRead(buf, len));
|
||||
};
|
||||
pipe.inPipe = AuUnsafeRaiiToShared(&reader);
|
||||
pipe.writePipe = AuUnsafeRaiiToShared(&decompressed);
|
||||
|
||||
ASSERT_TRUE(AuCompression::Decompress(pipe, {type, 1024 * 64 * 2}));
|
||||
}
|
||||
|
2
Vendor/nlohmannjson
vendored
2
Vendor/nlohmannjson
vendored
@ -1 +1 @@
|
||||
Subproject commit a94430615d8360272151f602b8c9eeb58509ecde
|
||||
Subproject commit 3b16057ffaaed250cf207233f9238392ea0245ee
|
2
Win_x86_x64_Lite.bat
Normal file
2
Win_x86_x64_Lite.bat
Normal file
@ -0,0 +1,2 @@
|
||||
cd .\Build_Scripts
|
||||
win_x86.bat --lite %* --target-x86_64
|
Loading…
Reference in New Issue
Block a user