all pending manual tests done!

[?]
Jun 15, 2022, 5:47 AM
4AXV2HG4NMAHAWGWD35V5PXULNORCBEKY65UQT37XNYXCSB7TWEAC

Dependencies

  • [2] 66X36NZN a little more prose describing manual_tests
  • [3] 7DYUAOI6 test: undo moving point
  • [4] K464QQR4 more defensive resize handling
  • [5] YW5324Q3 bugfix: cut (C-x) without first selecting anything
  • [6] CPZGQT72 go through and fix similar issues
  • [7] GHZMRR33 some more manual tests related to drawings
  • [8] KAUD3YIK tests: deleting points/shapes
  • [9] BJ5X5O4A let's prevent the text cursor from ever getting on a drawing
  • [10] Y4VYNEGF test: autosave after name/move/delete of point
  • [11] T7SJSJIH test: undo naming a point
  • [*] K2X6G75Z start writing some tests for drawings

Change contents

  • replacement in drawing_tests.lua at line 589
    [4.1995][4.1995:2016]()
    -- change is saved
    [4.1995]
    [4.2016]
    -- undo is saved
  • replacement in drawing_tests.lua at line 635
    [3.1992][3.1992:2013]()
    -- change is saved
    [3.1992]
    [3.2013]
    -- undo is saved
  • edit in drawing_tests.lua at line 640
    [3.2211]
    [3.2211]
    end
    function test_undo_delete_point()
    io.write('\ntest_undo_delete_point')
    -- create a drawing with two lines connected at a point
    Filename = 'foo'
    App.screen.init{width=Margin_left+300, height=300}
    Lines = load_array{'```lines', '```', ''}
    Line_width = 256 -- drawing coordinates 1:1 with pixels
    Current_drawing_mode = 'line'
    App.draw()
    App.run_after_mouse_press(Margin_left+5, Margin_top+Drawing_padding_top+6, 1)
    App.run_after_mouse_release(Margin_left+35, Margin_top+Drawing_padding_top+36, 1)
    App.run_after_mouse_press(Margin_left+35, Margin_top+Drawing_padding_top+36, 1)
    App.run_after_mouse_release(Margin_left+55, Margin_top+Drawing_padding_top+26, 1)
    local drawing = Lines[1]
    check_eq(#drawing.shapes, 2, 'F - test_undo_delete_point/baseline/#shapes')
    check_eq(drawing.shapes[1].mode, 'line', 'F - test_undo_delete_point/baseline/shape:1')
    check_eq(drawing.shapes[2].mode, 'line', 'F - test_undo_delete_point/baseline/shape:2')
    -- hover on the common point and delete
    App.mouse_move(Margin_left+35, Margin_top+Drawing_padding_top+36)
    App.run_after_keychord('C-d')
    check_eq(drawing.shapes[1].mode, 'deleted', 'F - test_undo_delete_point/shape:1')
    check_eq(drawing.shapes[2].mode, 'deleted', 'F - test_undo_delete_point/shape:2')
    -- undo
    App.run_after_keychord('C-z')
    local drawing = Lines[1]
    local p2 = drawing.points[drawing.shapes[1].p2]
    check_eq(Next_history, 3, 'F - test_undo_move_point/next_history')
    check_eq(drawing.shapes[1].mode, 'line', 'F - test_undo_delete_point/shape:1')
    check_eq(drawing.shapes[2].mode, 'line', 'F - test_undo_delete_point/shape:2')
    -- undo is saved
    Lines = load_from_disk(Filename)
    check_eq(#Lines[1].shapes, 2, 'F - test_undo_delete_point/save')
  • replacement in Manual_tests.md at line 2
    [2.138][2.138:210]()
    program before it ever runs. However, some things don't have tests yet.
    [2.138]
    [2.210]
    program before it ever runs. However, some things don't have tests yet, either
    because I don't know how to test them or because I've been lazy. I'll at least
    record those here.
  • edit in Manual_tests.md at line 13
    [2.520][2.520:521]()
  • edit in Manual_tests.md at line 15
    [2.536][4.1389:1390](),[4.1389][4.1389:1390](),[4.147][4.7:13](),[4.29][4.29:47]()
    undo:
    deleting points