aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test.lua9
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