more streamlined test names

[?]
Dec 13, 2022, 5:43 PM
GDAWPFAVMBKIOLQSK2BYRSEJKB4VDZATZBWL3DYODU6T6DPZJLWQC

Dependencies

  • [2] 5BMR5HRT click to the left of a line
  • [3] P6SYWBLB remove a duplicate test
  • [4] UHB4GARJ left/right margin -> left/right coordinates
  • [5] KOTI3MFG bugfix in previous commit
  • [6] APYPFFS3 call edit rather than App callbacks in tests
  • [7] DRFE3B3Z mouse buttons are integers, not strings
  • [8] NUZFHX6I flesh out some tests for word movements
  • [9] 356GY7IQ unify two similar functions
  • [10] LAW2O3NW extract variable Margin_left
  • [11] LXTTOB33 extract a couple of files
  • [12] LF7BWEG4 group all editor globals
  • [13] 7NQCCB34 .
  • [14] CNCYMM6A make test initializations a little more obvious
  • [15] EKKFWP4D bugfix: couple of margin-relative computations
  • [16] AQQQNDTL yet another bugfix in selection management
  • [17] LNUHQOGH start passing in Editor_state explicitly
  • [18] VSBSWTE4 bugfix: where cursor is drawn
  • [19] Y2ZIPXEM new test
  • [20] H3ECRBXF bugfix: clicking on empty lines

Change contents

  • replacement in text_tests.lua at line 270
    [4.4280][4.2:35](),[4.93][4.2:35](),[4.35][4.2:40]()
    function test_click_with_mouse()
    io.write('\ntest_click_with_mouse')
    [4.4280]
    [3.2]
    function test_click_moves_cursor()
    io.write('\ntest_click_moves_cursor')
  • replacement in text_tests.lua at line 282
    [3.354][4.2:84](),[4.471][4.2:84](),[4.84][3.355:435]()
    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')
    [3.354]
    [3.435]
    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
    [3.492][3.492:662]()
    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')
    [3.492]
    [4.2]
    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
    [4.7][2.2:105]()
    function test_click_with_mouse_to_left_of_line()
    io.write('\ntest_click_with_mouse_to_left_of_line')
    [4.7]
    [2.105]
    function test_click_to_left_of_line()
    io.write('\ntest_click_to_left_of_line')
  • replacement in text_tests.lua at line 303
    [2.616][2.616:949]()
    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')
    [2.616]
    [2.949]
    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
    [2.954][4.165:290](),[4.7][4.165:290]()
    function test_click_with_mouse_takes_margins_into_account()
    io.write('\ntest_click_with_mouse_takes_margins_into_account')
    [2.954]
    [4.290]
    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')
    [4.848]
    [4.1214]
    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
    [4.1219][4.7:106](),[4.7][4.7:106]()
    function test_click_with_mouse_on_empty_line()
    io.write('\ntest_click_with_mouse_on_empty_line')
    [4.1219]
    [4.106]
    function test_click_on_empty_line()
    io.write('\ntest_click_on_empty_line')
  • replacement in text_tests.lua at line 342
    [4.473][4.8027:8118]()
    check_eq(Editor_state.cursor1.line, 1, 'F - test_click_with_mouse_on_empty_line/cursor')
    [4.473]
    [4.524]
    check_eq(Editor_state.cursor1.line, 1, 'F - test_click_on_empty_line/cursor')
  • replacement in text_tests.lua at line 399
    [4.1225][4.1225:1330]()
    function test_click_with_mouse_on_wrapping_line()
    io.write('\ntest_click_with_mouse_on_wrapping_line')
    [4.1225]
    [4.1330]
    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')
    [4.1843]
    [4.1759]
    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
    [4.1764][4.2180:2339]()
    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')
    [4.1764]
    [4.2339]
    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')
    [4.2915]
    [4.3332]
    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')