From 4f6478483306bcd1f1b8aa033134b20c4a116aad Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 12 Jun 2022 10:19:06 -0700 Subject: new test For commit ff88a2a927 which fixed a regression caused by commit e51ce12969. I'm trying to provide enough guardrails for myself and future readers without causing a combinatorial explosion in tests. The previous commit was able to get more value out of existing tests, but this test feels necessary. And useful in general without reference to a specific bug. --- text_tests.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/text_tests.lua b/text_tests.lua index fab2e7b..6b92153 100644 --- a/text_tests.lua +++ b/text_tests.lua @@ -11,6 +11,18 @@ function test_insert_first_character() App.screen.check(y, 'a', 'F - test_insert_first_character/screen:1') end +function test_press_ctrl() + io.write('\ntest_press_ctrl') + -- press ctrl while the cursor is on text + App.screen.init{width=50, height=80} + Lines = load_array{''} + Line_width = App.screen.width + Cursor1 = {line=1, pos=1} + Screen_top1 = {line=1, pos=1} + Screen_bottom1 = {} + App.run_after_keychord('C-m') +end + function test_draw_text() io.write('\ntest_draw_text') App.screen.init{width=120, height=60} -- cgit 1.4.1-2-gfad0