couple more tests
[?]
May 25, 2022, 7:59 PM
AD34IX2ZSGYGU3LGY2IZOZNKD4HRQOYJVG5UWMWLXJZJSM62FFOACDependencies
- [2]
4RUI5X52a few tests for pageup, and a bugfix - [3]
2C7CTIQYmake space for multiple kinds of width - [4]
A2TQYJ6J. - [5]
BLWAYPKVextract a module - [6]
RCDVDFJQcomment - [7]
BYG5CEMVsupport for naming points - [8]
IYW7X3WLleft/right cursor movement, deleting characters - [9]
6PUNJS5Bbackspace - [10]
MGOQ5XAVstart uppercasing globals - [11]
DAENUOGVeliminate assumptions that line length == size in bytes - [12]
SVJZZDC3snapshot - no, that's all wrong - [13]
OTIBCAUJlove2d scaffold - [14]
AVQ5MC5Dfinish uppercasing all globals - [15]
2RXZ3PGObeginning of a new approach to scroll+wrap - [16]
VVXVV2D2change data model; text can now have metadata - [17]
6LJZN727handle chords - [18]
G77XIN7Mselecting a stroke - [19]
IRV65LZPfold variables for screen dimensions into the app framework - [20]
OIB2QPRCstart remembering where the cursor is drawn in px - [21]
AVTNUQYRbasic test-enabled framework - [22]
MNWHXPBLmore lightweight; select just the stroke at the mouse - [23]
YKRF5V3Zstarting to load/save - [24]
KJKKASHZreduce ambitions a bit: page up/down need not start screen from the middle of a line - [25]
3QNOKBFMbeginnings of a test harness - [26]
VHQCNMARseveral more modules - [27]
JCSLDGAHbeginnings of support for multiple shapes - [28]
XX7G2FFJintermingle freehand line drawings with text - [*]
BULPIBEGbeginnings of a module for the text editor - [*]
QYIFOHW3first test! - [*]
YTSPVDZHfirst successful pagedown test, first bug found by test - [*]
PGZJ6NATensure Filename is writable when opened outside a terminal
Change contents
- edit in text.lua at line 98
function test_draw_wrapping_text()io.write('\ntest_draw_wrapping_text')App.screen.init{width=50, height=60}Lines = load_array{'abc', 'defgh', 'xyz'}Line_width = App.screen.widthCursor1 = {line=1, pos=1}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Zoom = 1App.draw()local screen_top_margin = 15 -- pixelslocal line_height = 15 -- pixelslocal y = screen_top_marginApp.screen.check(y, 'abc', 'F - test_draw_wrapping_text/screen:1')y = y + line_heightApp.screen.check(y, 'def', 'F - test_draw_wrapping_text/screen:2')y = y + line_heightApp.screen.check(y, 'gh', 'F - test_draw_wrapping_text/screen:3')endfunction test_edit_wrapping_text()io.write('\ntest_edit_wrapping_text')App.screen.init{width=50, height=60}Lines = load_array{'abc', 'def', 'xyz'}Line_width = App.screen.widthCursor1 = {line=2, pos=4}Screen_top1 = {line=1, pos=1}Screen_bottom1 = {}Zoom = 1App.run_after_textinput('g')App.run_after_textinput('h')App.run_after_textinput('i')App.run_after_textinput('j')App.run_after_textinput('k')App.run_after_textinput('l')local screen_top_margin = 15 -- pixelslocal line_height = 15 -- pixelslocal y = screen_top_marginApp.screen.check(y, 'abc', 'F - test_edit_wrapping_text/screen:1')y = y + line_heightApp.screen.check(y, 'def', 'F - test_edit_wrapping_text/screen:2')y = y + line_heightApp.screen.check(y, 'ghij', 'F - test_edit_wrapping_text/screen:3')end - replacement in main.lua at line 15
function App.initialize(arg)love.keyboard.setTextInput(true) -- bring up keyboard on touch screenlove.keyboard.setKeyRepeat(true)-- globals-- run in both tests and a real runfunction App.initialize_globals() - edit in main.lua at line 59[3.59]→[3.1238:1239](∅→∅),[3.69]→[3.1238:1239](∅→∅),[3.74]→[3.1238:1239](∅→∅),[3.76]→[3.1238:1239](∅→∅),[3.183]→[3.1238:1239](∅→∅),[3.264]→[3.1238:1239](∅→∅),[3.287]→[3.1238:1239](∅→∅),[3.520]→[3.1238:1239](∅→∅),[3.1883]→[3.1238:1239](∅→∅),[3.9198]→[3.1238:1239](∅→∅),[3.14]→[3.1238:1239](∅→∅),[3.1239]→[3.915:973](∅→∅),[3.973]→[3.4:64](∅→∅),[3.64]→[3.1039:1091](∅→∅),[3.1039]→[3.1039:1091](∅→∅),[3.1091]→[3.65:204](∅→∅),[3.204]→[2.4101:4217](∅→∅)
-- maximize windowlove.window.setMode(0, 0) -- maximizeApp.screen.width, App.screen.height = love.window.getMode()-- shrink slightly to account for window decorationApp.screen.width = App.screen.width-100App.screen.height = App.screen.height-100love.window.setMode(App.screen.width, App.screen.height)--? App.screen.width = 120--? App.screen.height = 200--? love.window.setMode(App.screen.width, App.screen.height) - edit in main.lua at line 72[33.63][3.47]
end -- App.initialize_globalsfunction App.initialize(arg)love.keyboard.setTextInput(true) -- bring up keyboard on touch screenlove.keyboard.setKeyRepeat(true)-- maximize windowlove.window.setMode(0, 0) -- maximizeApp.screen.width, App.screen.height = love.window.getMode()-- shrink slightly to account for window decorationApp.screen.width = App.screen.width-100App.screen.height = App.screen.height-100love.window.setMode(App.screen.width, App.screen.height)--? App.screen.width = 120--? App.screen.height = 200--? love.window.setMode(App.screen.width, App.screen.height) - replacement in file.lua at line 32
local outfile = io.open(filename, 'w')local outfile = App.open_for_writing(filename) - edit in app.lua at line 18
if App.initialize_globals then App.initialize_globals() end - edit in app.lua at line 133
App.filesystem = {}if App.initialize_globals then App.initialize_globals() end - edit in app.lua at line 203
end-- fake filesfunction App.open_for_writing(filename)App.filesystem[filename] = ''return {write = function(self, s)App.filesystem[filename] = App.filesystem[filename]..send,close = function(self)end} - edit in app.lua at line 246
App.filesystem = nil - edit in app.lua at line 248
App.run_after_keychord = nil - edit in app.lua at line 254
App.open_for_writing = function(filename) return io.open(filename, 'w') end