Now have a working config manager that can exist in the world properly.

This commit is contained in:
Zed A. Shaw 2024-11-03 05:57:35 -05:00
parent f6ddf4b03b
commit ddf1ba955c
5 changed files with 46 additions and 6 deletions

View file

@ -12,7 +12,6 @@
#include <ftxui/screen/screen.hpp> // for Full, Screen
#include <ftxui/screen/terminal.hpp> // for ColorSupport, Color, Palette16, Palette256, TrueColor
using namespace fmt;
using namespace ftxui;
@ -56,12 +55,12 @@ TEST_CASE("test out ragel parser", "[gui]") {
sf::Color default_bg(100,100,100);
// this sets the Truecolor so need to do it first
ANSIParser parser(default_fg, default_bg);
ANSIParser ansi(default_fg, default_bg);
std::string colors = generate_colors();
std::cout << colors;
bool good = parser.parse(colors, [&](sf::Color bgcolor, sf::Color color, wchar_t ch) {
bool good = ansi.parse(colors, [&](sf::Color bgcolor, sf::Color color, wchar_t ch) {
bool correct_char = ch == '#' || ch == ' ' || ch == '\n' || ch == '\r';
REQUIRE(correct_char);
});