aboutsummaryrefslogtreecommitdiff
path: root/ttt.jai
diff options
context:
space:
mode:
Diffstat (limited to 'ttt.jai')
-rw-r--r--ttt.jai27
1 files changed, 26 insertions, 1 deletions
diff --git a/ttt.jai b/ttt.jai
index 13c9fcf..8dda204 100644
--- a/ttt.jai
+++ b/ttt.jai
@@ -1157,7 +1157,7 @@ prompt_user_key :: (y: int, message: string) -> TUI.Key {
main :: () {
// -- -- -- Testing TUI -- START
-
+
perform_test := false;
assert_result :: (result: bool, error_message: string) {
@@ -1188,6 +1188,31 @@ main :: () {
}
if perform_test && 1 {
+ print("TEST : module logger\n", to_standard_error = true);
+ log("- log: before module start.");
+ TUI.start();
+
+ TUI.set_cursor_position(3, 3);
+ print("wait");
+ sleep_milliseconds(1000);
+ log("- log: while module is active.");
+ sleep_milliseconds(1000);
+ print(" a bit");
+ sleep_milliseconds(1000);
+
+ #import "Windows";
+ handle: HANDLE = ---;
+ initial_stdin_mode: u32;
+ if xx GetConsoleMode(handle, *initial_stdin_mode) == false {
+ error_code, error_string := get_error_value_and_string();
+ log_error("- log: error code %, %", error_code, error_string);
+ }
+
+ TUI.stop();
+ log("- log: after module stop.");
+ }
+
+ if perform_test && 1 {
print("TEST : test key input\n", to_standard_error = true);
auto_release_temp();
TUI.start();