snapshot: test for a new regression
[?]
Jun 20, 2022, 7:06 PM
S2YQBEYCOBS4ADO5VX4YLAWY6CJEQOOZM3THYTDOTXM7ADID6PGQCDependencies
- [2]
LXTTOB33extract a couple of files
Change contents
- edit in text_tests.lua at line 1319
endfunction test_undo_restores_selection()io.write('\ntest_undo_restores_selection')-- display a line of text with some part selectedApp.screen.init{width=80, height=80}Lines = load_array{'abc'}Line_width = 75Cursor1 = {line=1, pos=1}Selection1 = {line=1, pos=2}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}App.draw()-- delete selected textApp.run_after_textinput('x')check_eq(Lines[1].data, 'xbc', 'F - test_undo_restores_selection/baseline')check_nil(Selection1.line, 'F - test_undo_restores_selection/baseline:selection')-- undoApp.run_after_keychord('C-z')-- selection is restoredcheck_eq(Selection1.line, 1, 'F - test_undo_restores_selection/line')check_eq(Selection1.pos, 2, 'F - test_undo_restores_selection/pos')