vtgl

terminal emulator implemented in OpenGL
git clone anongit@rnpnr.xyz:vtgl.git
Log | Files | Refs | Feed | LICENSE

Commit: c985fcd199a405a8914399a0d648485ecc4f55c8
Parent: 65619029d828def759a1fe67630dc3d5a157b6a0
Author: Randy Palamar
Date:   Mon,  8 Jul 2024 21:57:13 -0600

test: combine s8() with CSI/ESC macros

Diffstat:
Mtest.c | 18+++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/test.c b/test.c @@ -5,7 +5,7 @@ static const char *glfwGetWindowTitle(GLFWwindow *w) { return "test"; }; #include "util.h" -#define ESC(a) "\x1B"#a +#define ESC(a) s8("\x1B"#a) #define CSI(a) ESC([a) struct test_result { b32 status; const char *info; }; @@ -69,11 +69,11 @@ static TEST_FN(cursor_movement) { struct test_result result = {.info = __FUNCTION__}; - s8 raw = launder_static_string(term, s8(CSI(17;2H))); + s8 raw = launder_static_string(term, CSI(17;2H)); split_raw_input_to_lines(term, raw); blit_lines(term, arena); - raw = launder_static_string(term, s8(CSI(7G))); + raw = launder_static_string(term, CSI(7G)); split_raw_input_to_lines(term, raw); blit_lines(term, arena); @@ -86,12 +86,12 @@ static TEST_FN(colour_setting) { struct test_result result = {.info = __FUNCTION__}; - launder_static_string(term, s8(CSI(8m))); - launder_static_string(term, s8(CSI(4m))); - launder_static_string(term, s8(CSI(9m))); - launder_static_string(term, s8(CSI(24m))); - launder_static_string(term, s8(CSI(33m))); - launder_static_string(term, s8(CSI(48;2;75;63;42m))); + launder_static_string(term, CSI(8m)); + launder_static_string(term, CSI(4m)); + launder_static_string(term, CSI(9m)); + launder_static_string(term, CSI(24m)); + launder_static_string(term, CSI(33m)); + launder_static_string(term, CSI(48;2;75;63;42m)); s8 raw = launder_static_string(term, s8("A")); split_raw_input_to_lines(term, raw);