diff options
author | 2020-05-24 15:06:48 -0400 | |
---|---|---|
committer | 2020-05-24 15:06:48 -0400 | |
commit | 426e323063217b4395dd1871392d3df13c30ed4f (patch) | |
tree | 4ae97748af4f5acb5e2570fbb971a15c10a7fc68 /test | |
parent | 8fcdf4cd321dc928c35482e683072798882a0eef (diff) | |
download | textadept-426e323063217b4395dd1871392d3df13c30ed4f.tar.gz textadept-426e323063217b4395dd1871392d3df13c30ed4f.zip |
Updated tests for recent command entry history change.
Diffstat (limited to 'test')
-rw-r--r-- | test/test.lua | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/test/test.lua b/test/test.lua index 1d920f6e..e67f02ae 100644 --- a/test/test.lua +++ b/test/test.lua @@ -1212,9 +1212,9 @@ function test_command_entry_history() events.emit(events.KEYPRESS, not CURSES and 0xFF0D or 343) -- \n ui.command_entry.run(one) - assert_equal(ui.command_entry:get_text(), '') - events.emit(events.KEYPRESS, not CURSES and 0xFF52 or 301) -- up assert_equal(ui.command_entry:get_text(), 'foo') + assert_equal(ui.command_entry.selection_start, 1) + assert_equal(ui.command_entry.selection_end, 4) events.emit(events.KEYPRESS, not CURSES and 0xFF52 or 301) -- up assert_equal(ui.command_entry:get_text(), 'foo') -- no prior history events.emit(events.KEYPRESS, not CURSES and 0xFF54 or 300) -- down @@ -1224,8 +1224,6 @@ function test_command_entry_history() ui.command_entry.run(one) events.emit(events.KEYPRESS, not CURSES and 0xFF52 or 301) -- up - assert_equal(ui.command_entry:get_text(), 'baz') - events.emit(events.KEYPRESS, not CURSES and 0xFF52 or 301) -- up assert_equal(ui.command_entry:get_text(), 'foo') events.emit(events.KEYPRESS, not CURSES and 0xFF54 or 300) -- down assert_equal(ui.command_entry:get_text(), 'baz') @@ -1234,15 +1232,12 @@ function test_command_entry_history() ui.command_entry.run(one) events.emit(events.KEYPRESS, not CURSES and 0xFF52 or 301) -- up - assert_equal(ui.command_entry:get_text(), 'foo') - events.emit(events.KEYPRESS, not CURSES and 0xFF52 or 301) -- up assert_equal(ui.command_entry:get_text(), 'baz') events.emit(events.KEYPRESS, not CURSES and 0xFF52 or 301) -- up assert_equal(ui.command_entry:get_text(), 'foo') events.emit(events.KEYPRESS, not CURSES and 0xFF1B or 7) -- esc ui.command_entry.run(two) - events.emit(events.KEYPRESS, not CURSES and 0xFF52 or 301) -- up assert_equal(ui.command_entry:get_text(), 'bar') events.emit(events.KEYPRESS, not CURSES and 0xFF1B or 7) -- esc end |