aboutsummaryrefslogtreecommitdiff
path: root/modules/TUI/tests.jai
diff options
context:
space:
mode:
authordam <dam@gudinoff>2024-05-16 02:42:04 +0100
committerdam <dam@gudinoff>2024-05-16 02:42:04 +0100
commitbdea73c8349c2c918befad4120f49f9826d270dc (patch)
tree972b9b2f4c1025bc1a0ccb67ce3a3b6cb04500f5 /modules/TUI/tests.jai
parent7d3ac280da5321c469e2b08ce86783133b367cdc (diff)
downloadtask-time-tracker-bdea73c8349c2c918befad4120f49f9826d270dc.tar.zst
task-time-tracker-bdea73c8349c2c918befad4120f49f9826d270dc.zip
Imported new module structure.
Diffstat (limited to 'modules/TUI/tests.jai')
-rw-r--r--modules/TUI/tests.jai19
1 files changed, 2 insertions, 17 deletions
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
@@ -32,21 +32,6 @@ main :: () {
}
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();
assert(TUI.setup_terminal(), "Failed to setup TUI.");
@@ -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;