diff options
author | dec05eba <dec05eba@protonmail.com> | 2022-11-06 13:54:02 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2022-11-07 14:24:32 +0100 |
commit | 8025d1075db0779bde635148f6e38303eb29d6c8 (patch) | |
tree | 64dce4cc00fa55edba0ab7d2522e13473e6ef3c4 /tests | |
parent | f8b3a9d055bfc0e4bb9e9a570ccc8853ec38a225 (diff) |
Formatted text with color in matrix, monospace for codeblocks
Diffstat (limited to 'tests')
-rw-r--r-- | tests/main.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/main.cpp b/tests/main.cpp index 41ef45d..c076e14 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -2,6 +2,7 @@ #include <string.h> #include "../include/NetUtils.hpp" #include "../plugins/utils/EpisodeNameParser.hpp" +#include "../plugins/Matrix.hpp" #include "../generated/Emoji.hpp" #define assert_fail(str) do { fprintf(stderr, "Assert failed on line %d, reason: %s\n", __LINE__, (str)); exit(1); } while(0) @@ -112,5 +113,11 @@ int main() { assert_equals(emoji_sequence_length, 4); assert_equals(emoji_sequence_byte_length, 13); + const std::string formatted_text = "<font color=\"#789922\">\n<p>>amazin<br>>asd</p>\n</font>\n<p>feaf</p>\n"; + const std::string qm_text = formatted_text_to_qm_text(formatted_text.c_str(), formatted_text.size()); + for(char c : qm_text) { + fprintf(stderr, "%c(%02x) ", c, *(uint8_t*)&c); + } + return 0; } |