more streamlined test names
[?]
Dec 13, 2022, 5:43 PM
GDAWPFAVMBKIOLQSK2BYRSEJKB4VDZATZBWL3DYODU6T6DPZJLWQCDependencies
- [2]
5BMR5HRTclick to the left of a line - [3]
P6SYWBLBremove a duplicate test - [4]
UHB4GARJleft/right margin -> left/right coordinates - [5]
KOTI3MFGbugfix in previous commit - [6]
APYPFFS3call edit rather than App callbacks in tests - [7]
DRFE3B3Zmouse buttons are integers, not strings - [8]
NUZFHX6Iflesh out some tests for word movements - [9]
356GY7IQunify two similar functions - [10]
LAW2O3NWextract variable Margin_left - [11]
LXTTOB33extract a couple of files - [12]
LF7BWEG4group all editor globals - [13]
7NQCCB34. - [14]
CNCYMM6Amake test initializations a little more obvious - [15]
EKKFWP4Dbugfix: couple of margin-relative computations - [16]
AQQQNDTLyet another bugfix in selection management - [17]
LNUHQOGHstart passing in Editor_state explicitly - [18]
VSBSWTE4bugfix: where cursor is drawn - [19]
Y2ZIPXEMnew test - [20]
H3ECRBXFbugfix: clicking on empty lines
Change contents
- replacement in text_tests.lua at line 270
function test_click_with_mouse()io.write('\ntest_click_with_mouse')function test_click_moves_cursor()io.write('\ntest_click_moves_cursor') - replacement in text_tests.lua at line 282
check_eq(Editor_state.cursor1.line, 1, 'F - test_click_with_mouse/cursor:line')check_eq(Editor_state.cursor1.pos, 2, 'F - test_click_with_mouse/cursor:pos')check_eq(Editor_state.cursor1.line, 1, 'F - test_click_moves_cursor/cursor:line')check_eq(Editor_state.cursor1.pos, 2, 'F - test_click_moves_cursor/cursor:pos') - replacement in text_tests.lua at line 285
check_nil(Editor_state.selection1.line, 'F - test_click_with_mouse/selection:line')check_nil(Editor_state.selection1.pos, 'F - test_click_with_mouse/selection:pos')check_nil(Editor_state.selection1.line, 'F - test_click_moves_cursor/selection:line')check_nil(Editor_state.selection1.pos, 'F - test_click_moves_cursor/selection:pos') - replacement in text_tests.lua at line 289
function test_click_with_mouse_to_left_of_line()io.write('\ntest_click_with_mouse_to_left_of_line')function test_click_to_left_of_line()io.write('\ntest_click_to_left_of_line') - replacement in text_tests.lua at line 303
check_eq(Editor_state.cursor1.line, 1, 'F - test_click_with_mouse_to_left_of_line/cursor:line')check_eq(Editor_state.cursor1.pos, 1, 'F - test_click_with_mouse_to_left_of_line/cursor:pos')check_nil(Editor_state.selection1.line, 'F - test_click_with_mouse_to_left_of_line/selection is empty to avoid perturbing future edits')check_eq(Editor_state.cursor1.line, 1, 'F - test_click_to_left_of_line/cursor:line')check_eq(Editor_state.cursor1.pos, 1, 'F - test_click_to_left_of_line/cursor:pos')check_nil(Editor_state.selection1.line, 'F - test_click_to_left_of_line/selection is empty to avoid perturbing future edits') - replacement in text_tests.lua at line 308
function test_click_with_mouse_takes_margins_into_account()io.write('\ntest_click_with_mouse_takes_margins_into_account')function test_click_takes_margins_into_account()io.write('\ntest_click_takes_margins_into_account') - replacement in text_tests.lua at line 323[4.848]→[4.848:957](∅→∅),[4.957]→[4.2:109](∅→∅),[4.109]→[4.1064:1214](∅→∅),[4.109]→[4.1064:1214](∅→∅),[4.1064]→[4.1064:1214](∅→∅)
check_eq(Editor_state.cursor1.line, 1, 'F - test_click_with_mouse_takes_margins_into_account/cursor:line')check_eq(Editor_state.cursor1.pos, 2, 'F - test_click_with_mouse_takes_margins_into_account/cursor:pos')check_nil(Editor_state.selection1.line, 'F - test_click_with_mouse_takes_margins_into_account/selection is empty to avoid perturbing future edits')check_eq(Editor_state.cursor1.line, 1, 'F - test_click_takes_margins_into_account/cursor:line')check_eq(Editor_state.cursor1.pos, 2, 'F - test_click_takes_margins_into_account/cursor:pos')check_nil(Editor_state.selection1.line, 'F - test_click_takes_margins_into_account/selection is empty to avoid perturbing future edits') - replacement in text_tests.lua at line 328
function test_click_with_mouse_on_empty_line()io.write('\ntest_click_with_mouse_on_empty_line')function test_click_on_empty_line()io.write('\ntest_click_on_empty_line') - replacement in text_tests.lua at line 342
check_eq(Editor_state.cursor1.line, 1, 'F - test_click_with_mouse_on_empty_line/cursor')check_eq(Editor_state.cursor1.line, 1, 'F - test_click_on_empty_line/cursor') - replacement in text_tests.lua at line 399
function test_click_with_mouse_on_wrapping_line()io.write('\ntest_click_with_mouse_on_wrapping_line')function test_click_on_wrapping_line()io.write('\ntest_click_on_wrapping_line') - replacement in text_tests.lua at line 413[4.1843]→[4.1843:1942](∅→∅),[4.1942]→[4.110:207](∅→∅),[4.207]→[4.2039:2179](∅→∅),[4.207]→[4.2039:2179](∅→∅),[4.2039]→[4.2039:2179](∅→∅)
check_eq(Editor_state.cursor1.line, 1, 'F - test_click_with_mouse_on_wrapping_line/cursor:line')check_eq(Editor_state.cursor1.pos, 2, 'F - test_click_with_mouse_on_wrapping_line/cursor:pos')check_nil(Editor_state.selection1.line, 'F - test_click_with_mouse_on_wrapping_line/selection is empty to avoid perturbing future edits')check_eq(Editor_state.cursor1.line, 1, 'F - test_click_on_wrapping_line/cursor:line')check_eq(Editor_state.cursor1.pos, 2, 'F - test_click_on_wrapping_line/cursor:pos')check_nil(Editor_state.selection1.line, 'F - test_click_on_wrapping_line/selection is empty to avoid perturbing future edits') - replacement in text_tests.lua at line 418
function test_click_with_mouse_on_wrapping_line_takes_margins_into_account()io.write('\ntest_click_with_mouse_on_wrapping_line_takes_margins_into_account')function test_click_on_wrapping_line_takes_margins_into_account()io.write('\ntest_click_on_wrapping_line_takes_margins_into_account') - replacement in text_tests.lua at line 433[4.2915]→[4.2915:3041](∅→∅),[4.3041]→[4.208:332](∅→∅),[4.332]→[4.3165:3332](∅→∅),[4.332]→[4.3165:3332](∅→∅),[4.3165]→[4.3165:3332](∅→∅)
check_eq(Editor_state.cursor1.line, 1, 'F - test_click_with_mouse_on_wrapping_line_takes_margins_into_account/cursor:line')check_eq(Editor_state.cursor1.pos, 2, 'F - test_click_with_mouse_on_wrapping_line_takes_margins_into_account/cursor:pos')check_nil(Editor_state.selection1.line, 'F - test_click_with_mouse_on_wrapping_line_takes_margins_into_account/selection is empty to avoid perturbing future edits')check_eq(Editor_state.cursor1.line, 1, 'F - test_click_on_wrapping_line_takes_margins_into_account/cursor:line')check_eq(Editor_state.cursor1.pos, 2, 'F - test_click_on_wrapping_line_takes_margins_into_account/cursor:pos')check_nil(Editor_state.selection1.line, 'F - test_click_on_wrapping_line_takes_margins_into_account/selection is empty to avoid perturbing future edits')