diff options
| author | dam <dam@gudinoff> | 2024-03-24 01:58:40 +0000 |
|---|---|---|
| committer | dam <dam@gudinoff> | 2024-03-24 01:58:40 +0000 |
| commit | 921e162a7369a45c5ddaa2355bbe8db0259d6526 (patch) | |
| tree | 0a87a49e6eedb500a821d51a0fb747d21df19d75 | |
| parent | 1ea51da155882a946cc0d9af8e7f90d674682c3b (diff) | |
| download | task-time-tracker-921e162a7369a45c5ddaa2355bbe8db0259d6526.tar.zst task-time-tracker-921e162a7369a45c5ddaa2355bbe8db0259d6526.zip | |
WIP : Added note about bug.
| -rw-r--r-- | ttt.jai | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -1420,6 +1420,40 @@ main :: () { TUI.stop(); } + // BUG + SECOND TIME CALLING TO read_input_line fails... + + if 1 { + print("TEST : hidden user input\n", to_standard_error = true); + auto_release_temp(); + TUI.start(); + TUI.clear_terminal(); + TUI.set_cursor_position(1, 1); + print("Enter some text (use Enter to finish, Esc to cancel, or resize to abort):"); + TUI.set_cursor_position(2, 1); + str, key := TUI.read_input_line(15, false); + TUI.set_cursor_position(3, 1); + if key == { + case TUI.Keys.Escape; { + print("Have you pressed Esc? (y/n)"); + assert(TUI.get_key() == #char "y", "Failed to read line on Esc."); + print("- success\n", to_standard_error = true); + } + + case TUI.Keys.Resize; { + print("Have you resized the terminal? (y/n)"); + assert(TUI.get_key() == #char "y", "Failed to read line on resize."); + print("- success\n", to_standard_error = true); + } + case; { + print("Have you entered '%'? (y/n)", str); + assert(TUI.get_key() == #char "y", "Failed to read line."); + print("- success\n", to_standard_error = true); + } + } + TUI.stop(); + } + write_string("DONE\n"); exit(0); // -- -- -- Testing TUI -- STOP |
