From bdea73c8349c2c918befad4120f49f9826d270dc Mon Sep 17 00:00:00 2001 From: dam Date: Thu, 16 May 2024 02:42:04 +0100 Subject: Imported new module structure. --- modules/TUI/tests.jai | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'modules/TUI/tests.jai') diff --git a/modules/TUI/tests.jai b/modules/TUI/tests.jai index fe213cb..a740e6b 100644 --- a/modules/TUI/tests.jai +++ b/modules/TUI/tests.jai @@ -31,21 +31,6 @@ main :: () { assert_result(x == X && y == Y, "Failed set/get cursor position.\n"); } - if 1 { - print("TEST : module logger\n", to_standard_error = true); - log("- log: before module start."); - assert(TUI.setup_terminal(), "Failed to setup TUI."); - TUI.set_cursor_position(3, 3); - print("wait"); - sleep_milliseconds(500); - log("- log: while module is active."); - sleep_milliseconds(500); - print(" a bit"); - sleep_milliseconds(1000); - assert(TUI.reset_terminal(), "Failed to reset TUI."); - log("- log: after module stop."); - } - if 1 { print("TEST : test key input\n", to_standard_error = true); auto_release_temp(); @@ -121,7 +106,7 @@ main :: () { print("TEST : print keys\n", to_standard_error = true); auto_release_temp(); assert(TUI.setup_terminal(), "Failed to setup TUI."); - key: TUI.Key = #char "d"; + key: TUI.Key = TUI.Keys.None; last_none_char := "X"; width, height := TUI.get_terminal_size(); @@ -135,7 +120,7 @@ main :: () { case TUI.Keys.None; { TUI.set_cursor_position(2, 2); last_none_char = ifx last_none_char == "X" then "+" else "X"; - write_strings(last_none_char, " (press q to exit)"); + write_strings(last_none_char, " (press: q to exit, c to clear, and any other key to print it's value)"); } case TUI.Keys.Resize; #through; -- cgit v1.2.3