all pending manual tests done!
[?]
Jun 15, 2022, 5:47 AM
4AXV2HG4NMAHAWGWD35V5PXULNORCBEKY65UQT37XNYXCSB7TWEACDependencies
- [2]
66X36NZNa little more prose describing manual_tests - [3]
7DYUAOI6test: undo moving point - [4]
K464QQR4more defensive resize handling - [5]
YW5324Q3bugfix: cut (C-x) without first selecting anything - [6]
CPZGQT72go through and fix similar issues - [7]
GHZMRR33some more manual tests related to drawings - [8]
KAUD3YIKtests: deleting points/shapes - [9]
BJ5X5O4Alet's prevent the text cursor from ever getting on a drawing - [10]
Y4VYNEGFtest: autosave after name/move/delete of point - [11]
T7SJSJIHtest: undo naming a point - [*]
K2X6G75Zstart writing some tests for drawings
Change contents
- replacement in drawing_tests.lua at line 589
-- change is saved-- undo is saved - replacement in drawing_tests.lua at line 635
-- change is saved-- undo is saved - edit in drawing_tests.lua at line 640
endfunction test_undo_delete_point()io.write('\ntest_undo_delete_point')-- create a drawing with two lines connected at a pointFilename = 'foo'App.screen.init{width=Margin_left+300, height=300}Lines = load_array{'```lines', '```', ''}Line_width = 256 -- drawing coordinates 1:1 with pixelsCurrent_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 deleteApp.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')-- undoApp.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 savedLines = load_from_disk(Filename)check_eq(#Lines[1].shapes, 2, 'F - test_undo_delete_point/save') - replacement in Manual_tests.md at line 2
program before it ever runs. However, some things don't have tests yet.program before it ever runs. However, some things don't have tests yet, eitherbecause I don't know how to test them or because I've been lazy. I'll at leastrecord those here. - edit in Manual_tests.md at line 13
- edit in Manual_tests.md at line 15
undo:deleting points