fix all tests in LÖVE v12

[?]
Oct 10, 2023, 3:25 AM
KVJTEXMSVG43EWSARA5O52EV2D4QTQZGO5RNSPVBHYZSWUMNI25QC

Dependencies

  • [2] I64IPGJX avoid saving fragments in lines
  • [3] GZ5WULJV switch source side to new screen-line-based render
  • [4] CVSRHMJ2 experiment: slightly adaptive scrolling
  • [5] APYPFFS3 call edit rather than App callbacks in tests
  • [6] UHB4GARJ left/right margin -> left/right coordinates
  • [7] KKMFQDR4 editing source code from within the app
  • [8] KMSL74GA support selections in the source editor
  • [9] LAW2O3NW extract variable Margin_left
  • [10] LF7BWEG4 group all editor globals
  • [11] JLU2RMC4 allow Text.nearest_pos_less_than to return 0
  • [12] ORRSP7FV deduce test names on failures
  • [13] LXTTOB33 extract a couple of files

Change contents

  • replacement in text_tests.lua at line 1119
    [4.26911][2.2:42]()
    App.screen.check(y, 'mn', 'screen:3')
    [4.26911]
    [4.10090]
    if Version == '12.0' then
    -- HACK: Maybe v12.0 uses a different font? Strange that it only causes
    -- issues in a couple of places.
    -- We'll need to rethink our tests if issues like this start to multiply.
    App.screen.check(y, 'mno ', 'screen:3')
    else
    App.screen.check(y, 'mn', 'screen:3')
    end
  • replacement in text_tests.lua at line 1836
    [4.33004][4.12469:12584]()
    edit.run_after_mouse_release(Editor_state, Editor_state.left+8,Editor_state.top+Editor_state.line_height*2+5, 1)
    [4.33004]
    [4.33130]
    edit.run_after_mouse_release(Editor_state, Editor_state.left+2,Editor_state.top+Editor_state.line_height*2+5, 1)
  • replacement in text_tests.lua at line 1839
    [4.18567][4.18567:18622]()
    check_eq(Editor_state.cursor1.pos, 26, 'cursor:pos')
    [4.18567]
    [4.33305]
    check_eq(Editor_state.cursor1.pos, 25, 'cursor:pos')
  • replacement in source_text_tests.lua at line 1089
    [4.35876][3.6:46]()
    App.screen.check(y, 'mn', 'screen:3')
    [4.35876]
    [4.35980]
    if Version == '12.0' then
    -- HACK: Maybe v12.0 uses a different font? Strange that it only causes
    -- issues in a couple of places.
    -- We'll need to rethink our tests if issues like this start to multiply.
    App.screen.check(y, 'mno ', 'screen:3')
    else
    App.screen.check(y, 'mn', 'screen:3')
    end
  • replacement in source_text_tests.lua at line 1806
    [4.73266][4.13209:13324]()
    edit.run_after_mouse_release(Editor_state, Editor_state.left+8,Editor_state.top+Editor_state.line_height*2+5, 1)
    [4.73266]
    [4.73379]
    edit.run_after_mouse_release(Editor_state, Editor_state.left+2,Editor_state.top+Editor_state.line_height*2+5, 1)
  • replacement in source_text_tests.lua at line 1809
    [4.41413][4.41413:41468]()
    check_eq(Editor_state.cursor1.pos, 26, 'cursor:pos')
    [4.41413]
    [4.73630]
    check_eq(Editor_state.cursor1.pos, 25, 'cursor:pos')