new test
[?]
Jun 12, 2022, 5:46 PM
Y2ZIPXEMMCY5GHJDDF7OMRKEQYMSDR5QTJDA7Y2SBOTHAJKHWVOACDependencies
- [2]
JFFUF5ALoverride mouse state lookups in tests - [*]
LXTTOB33extract a couple of files - [*]
3QNOKBFMbeginnings of a test harness - [*]
6E3HVYWFtest and App helper for mouse clicks
Change contents
- edit in text_tests.lua at line 26
function test_click_with_mouse()io.write('\ntest_click')-- display two lines with cursor on one of themApp.screen.init{width=50, height=80}Lines = load_array{'abc', 'def'}Line_width = App.screen.widthCursor1 = {line=2, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}-- click on the other linelocal screen_left_margin = 25 -- pixelsApp.draw()App.run_after_mouse_click(screen_left_margin+8,Margin_top+5, '1')-- cursor movescheck_eq(Cursor1.line, 1, 'F - test_click/cursor')end - edit in app.lua at line 239[6.755][2.5185]
function App.run_after_mouse_click(x,y, button)App.fake_mouse_press(x,y, button)App.mousepressed(x,y, button)App.fake_mouse_release(x,y, button)App.mousereleased(x,y, button)App.screen.contents = {}App.draw()end