Merge text0
[?]
Jan 21, 2023, 6:47 AM
CZQ3NJ4NQYNXUV5GLD4RI5ISNDDWTUZIL5UA366M6WBHL6SA2EUACDependencies
- [2]
TBWAE64Aapp is now live, can communicate with driver - [3]
CYGNFOA5Merge text0 - [4]
JNJ4R56Xsupport running tests multiple times - [5]
BC4SO6ARclean up a print - [6]
ECBDENZ4Merge text.love - [7]
FS2ITYYHrecord a known issue - [8]
R5QXEHUIsomebody stop me - [9]
2JLVAYHBstart decoupling editor tests from App - [10]
GUOQRUL7Merge lines.love - [11]
36Z442IVback to commit 8123959e52f without code editing - [12]
XX7G2FFJintermingle freehand line drawings with text - [13]
Y2ZIPXEMnew test - [14]
YIQYNVD2rip out the line-width slider - [15]
3PSFWAILMerge lines.love - [16]
2WGHUWE6self-documenting 0 Test_right_margin - [17]
JCXL74WVbring back everything from commit a68647ae22 - [18]
GZ2OYPSHconfigurable colors and cursor in editor widget - [19]
OTIBCAUJlove2d scaffold - [20]
ZTZOO2OQMerge lines.love - [21]
LF7BWEG4group all editor globals - [22]
2DVVKKVAflesh out Readme - [23]
AD34IX2Zcouple more tests - [24]
VHUNJHXBMerge lines.love - [25]
7CLGG7J2test: autosave after any shape - [26]
ETXNVRPTMerge lines.love - [27]
AVTNUQYRbasic test-enabled framework - [28]
BLWAYPKVextract a module - [29]
BULPIBEGbeginnings of a module for the text editor - [30]
6LJZN727handle chords - [31]
S4IAYCIRdelete all tests once they've executed - [32]
ZLJGZYQGselect text with shift + mouseclick - [33]
P6SYWBLBremove a duplicate test - [34]
D2GCFTTTclean up repl functionality - [35]
DSLD74DKlots more tests - [36]
LNUHQOGHstart passing in Editor_state explicitly - [37]
VSJS6O4CMerge text.love - [38]
EX43CDDIMerge text.love - [39]
5OVKHVY6nice way to make on.* handlers more discoverable - [40]
BJ5X5O4Alet's prevent the text cursor from ever getting on a drawing - [41]
JF5L2BBStest harness now supports copy/paste - [42]
EKKFWP4Dbugfix: couple of margin-relative computations - [43]
TVCPXAAUrename - [44]
K2X6G75Zstart writing some tests for drawings - [45]
CE4LZV4Tdrop last couple of manual tests - [46]
HOUCPP7PMerge text.love - [47]
IFTYOERMline.y -> line_cache.starty in a few more places - [48]
LAW2O3NWextract variable Margin_left - [49]
LXTTOB33extract a couple of files - [50]
KMSL74GAsupport selections in the source editor - [51]
JMUD7T3Oget rid of ugly side-effects in tests - [52]
PX7DDEMOautosave slightly less aggressively - [53]
A4BSGS2CMerge lines.love - [54]
KG7YVGVRMerge lines.love - [55]
H3ECRBXFbugfix: clicking on empty lines - [56]
2CTN2IEFMerge lines.love - [57]
VP5KC4XZMerge lines.love - [58]
JFFUF5ALoverride mouse state lookups in tests - [59]
VXORMHMEdelete experimental REPL - [60]
MUJTM6REbring back a level of wrapping - [61]
KKMFQDR4editing source code from within the app - [62]
HKV72RZVbugfix: save modified files in save directory - [63]
LRDM35CEapp running again - [64]
UHB4GARJleft/right margin -> left/right coordinates - [65]
DB7HJBHJMerge lines.love - [66]
D43U7GQ4alter on-disk representation (manifest files) - [67]
5F54FYKIMerge lines.love - [68]
VHQCNMARseveral more modules - [69]
OGUV4HSAremove some memory leaks from rendered fragments - [70]
62JEPVQ3bugfix: backspace from start of final line - [71]
C3GUE45IMerge text.love - [72]
BPWFKBXTnew test: dragging and dropping a file on lines.love - [73]
4YDBYBA4clean up memory leak experiments - [74]
PTDO2SOTadd state arg to schedule_save - [75]
3QNOKBFMbeginnings of a test harness - [76]
IMEJA43Lsnapshot - [77]
T4FRZSYLdelete an ancient, unused file - [78]
FCFJVYKYredundant check - [79]
TLOAPLBJadd a license - [80]
73OCE2MCafter much struggle, a brute-force undo - [81]
2L5MEZV3experiment: new edit namespace - [82]
V7LATJC7bugfix: resize - [83]
RSZD5A7Gforgot to add json.lua - [84]
JOPVPUSAediting source code from within the app - [85]
W5H5YI6SMerge text.love - [86]
D2IADHMWlink to default love.run for comparison - [87]
ORRSP7FVdeduce test names on failures - [88]
OL7ZCZWDMerge text.love - [89]
CNCYMM6Amake test initializations a little more obvious - [90]
ILOA5BYFseparate data structure for each line's cache data - [91]
MD3W5IRAnew fork: rip out drawing support - [92]
66X36NZNa little more prose describing manual_tests - [93]
H3KWPK3Gregression: dropping files on the window - [94]
GDAWPFAVmore streamlined test names - [95]
ORKN6EOBMerge lines.love - [96]
YT5P6TO6bugfix: save previous file when dropping a new one on - [97]
UTDSCN3GMerge lines.love
Change contents
- file deletion: run_tests.lua main_tests.lua run_tests.lua run_tests.lua[7.2]→[7.178068:178105](∅→∅),[7.2]→[7.1125:1163](∅→∅),[7.1163]→[7.7:7](∅→∅),[7.2]→[7.178005:178042](∅→∅),[7.178042]→[7.7:7](∅→∅),[7.2]→[7.178068:178105](∅→∅),[7.178105]→[7.7:7](∅→∅)
check_eq(App.filesystem['foo'], 'abc\ndef\n', 'check')endcheck_eq(#Editor_state.lines, 3, '#lines')check_eq(Editor_state.lines[1].data, 'abc', 'lines:1')check_eq(Editor_state.lines[2].data, 'def', 'lines:2')check_eq(Editor_state.lines[3].data, 'ghi', 'lines:3')edit.draw(Editor_state)check_eq(App.screen.width, 200, 'width')check_eq(App.screen.height, 400, 'height')check_eq(Editor_state.left, Margin_left, 'left_margin')check_eq(Editor_state.right, 200-Margin_right, 'right_margin')check_eq(Editor_state.width, 200-Margin_left-Margin_right, 'drawing_width')-- TODO: how to make assertions about when App.update got past the early exit?endcheck_eq(App.screen.width, 300, 'baseline/width')check_eq(App.screen.height, 300, 'baseline/height')check_eq(Editor_state.left, Test_margin_left, 'baseline/left_margin')check_eq(Editor_state.right, 300 - Test_margin_right, 'baseline/left_margin')-- ugly; resize switches to real, non-test marginscheck_eq(App.screen.width, 200, 'width')check_eq(App.screen.height, 400, 'height')check_eq(Editor_state.left, Margin_left, 'left_margin')check_eq(Editor_state.right, 200-Margin_right, 'right_margin')check_eq(Editor_state.width, 200-Margin_left-Margin_right, 'drawing_width')App.resize(200, 400) - resurrect zombie in text_tests.lua at line 8
edit.draw(Editor_state, Text_color) - resurrect zombie in text_tests.lua at line 9
check_eq(#Editor_state.lines, 1, '#lines')check_eq(Editor_state.cursor1.line, 1, 'cursor:line')check_eq(Editor_state.cursor1.pos, 1, 'cursor:pos')check_eq(Editor_state.screen_top1.line, 1, 'screen_top:line')check_eq(Editor_state.screen_top1.pos, 1, 'screen_top:pos') - resolve order conflict in text_tests.lua at line 9
- edit in text_tests.lua at line 231[7.7400]→[3.4:33](∅→∅),[3.33]→[7.665:703](∅→∅),[7.329]→[7.665:703](∅→∅),[7.703]→[3.35:35](∅→∅),[3.35]→[3.36:345](∅→∅)
-- click on the other lineedit.draw(Editor_state, Text_color)edit.run_after_mouse_click(Editor_state, Editor_state.left+8,Editor_state.top+5, 1)-- cursor movescheck_eq(Editor_state.cursor1.line, 1, 'F - test_click_with_mouse/cursor:line')check_nil(Editor_state.selection1.line, 'F - test_click_with_mouse/selection is empty to avoid perturbing future edits') - resurrect zombie in text_tests.lua at line 231[7.354]→[7.1633:1743](∅→∅),[7.354]→[7.1633:1743](∅→∅),[7.492]→[7.1744:1862](∅→∅),[7.492]→[7.1744:1862](∅→∅)
check_eq(Editor_state.cursor1.line, 1, 'cursor:line')check_eq(Editor_state.cursor1.pos, 2, 'cursor:pos')check_nil(Editor_state.selection1.line, 'selection:line')check_nil(Editor_state.selection1.pos, 'selection:pos') - edit in text_tests.lua at line 231
Editor_state.selection1 = {}edit.draw(Editor_state, Text_color) -- populate line_cache.starty for each line Editor_state.line_cacheedit.run_after_mouse_release(Editor_state, Editor_state.left+8,Editor_state.top+5, 1) - edit in text_tests.lua at line 236
-- selection is empty to avoid perturbing future edits - edit in text_tests.lua at line 783[7.6666]→[7.5647:5652](∅→∅),[7.5647]→[7.5647:5652](∅→∅),[7.5652]→[3.348:757](∅→∅),[3.757]→[7.1718:1825](∅→∅),[7.19386]→[7.1718:1825](∅→∅),[7.1825]→[3.758:1206](∅→∅)
endfunction test_move_cursor_using_mouse()io.write('\ntest_move_cursor_using_mouse')App.screen.init{width=50, height=60}Editor_state = edit.initialize_test_state()Editor_state.lines = load_array{'abc', 'def', 'xyz'}Text.redraw_all(Editor_state)Editor_state.cursor1 = {line=1, pos=1}Editor_state.screen_top1 = {line=1, pos=1}Editor_state.screen_bottom1 = {}Editor_state.selection1 = {}edit.draw(Editor_state, Text_color) -- populate line_cache.starty for each line Editor_state.line_cacheedit.run_after_mouse_release(Editor_state, Editor_state.left+8,Editor_state.top+5, 1)check_eq(Editor_state.cursor1.line, 1, 'F - test_move_cursor_using_mouse/cursor:line')check_eq(Editor_state.cursor1.pos, 2, 'F - test_move_cursor_using_mouse/cursor:pos')check_nil(Editor_state.selection1.line, 'F - test_move_cursor_using_mouse/selection:line')check_nil(Editor_state.selection1.pos, 'F - test_move_cursor_using_mouse/selection:pos') - edit in app.lua at line 3
-- Most apps can just use the default (https://love2d.org/wiki/love.run), but-- we need to override it to install a test harness. - edit in app.lua at line 434
local status, err = xpcall(_G[name], handle_error_in_test) - resurrect zombie in app.lua at line 436
App = saved_app - edit in app.lua at line 439
function handle_error_in_test(err)local full_error = debug.traceback('Error: '..err, --[[stack frame]]3):gsub('\n[^\n]+$', '')table.insert(Test_errors, full_error..'\n') - resurrect zombie in app.lua at line 439
-- prepend file/line/testfunction prepend_debug_info_to_test_failure(test_name, err)local err_without_line_number = err:gsub('^[^:]*:[^:]*: ', '')local stack_trace = debug.traceback('', --[[stack frame]]5)local file_and_line_number = stack_trace:gsub('stack traceback:\n', ''):gsub(': .*', '')local full_error = file_and_line_number..':'..test_name..' -- '..err_without_line_numbertable.insert(Test_errors, full_error)end - edit in app.lua at line 447[7.61192]→[7.61192:61193](∅→∅),[7.61192]→[7.61192:61193](∅→∅),[4.2260]→[7.8162:8166](∅→∅),[7.2306]→[7.8162:8166](∅→∅),[7.2791]→[7.8162:8166](∅→∅),[7.3061]→[7.8162:8166](∅→∅),[7.5677]→[7.8162:8166](∅→∅),[7.8162]→[7.8162:8166](∅→∅)
end