Merge lines.love
This commit is contained in:
commit
08b7318c0d
1
main.lua
1
main.lua
|
@ -124,6 +124,7 @@ function App.filedropped(file)
|
||||||
file:open('r')
|
file:open('r')
|
||||||
Editor_state.lines = load_from_file(file)
|
Editor_state.lines = load_from_file(file)
|
||||||
file:close()
|
file:close()
|
||||||
|
Text.redraw_all(Editor_state)
|
||||||
love.window.setTitle('text.love - '..Editor_state.filename)
|
love.window.setTitle('text.love - '..Editor_state.filename)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ end
|
||||||
function test_drop_file()
|
function test_drop_file()
|
||||||
io.write('\ntest_drop_file')
|
io.write('\ntest_drop_file')
|
||||||
App.screen.init{width=Editor_state.left+300, height=300}
|
App.screen.init{width=Editor_state.left+300, height=300}
|
||||||
|
Editor_state = edit.initialize_test_state()
|
||||||
App.filesystem['foo'] = 'abc\ndef\nghi\n'
|
App.filesystem['foo'] = 'abc\ndef\nghi\n'
|
||||||
local fake_dropped_file = {
|
local fake_dropped_file = {
|
||||||
opened = false,
|
opened = false,
|
||||||
|
@ -41,6 +42,7 @@ function test_drop_file()
|
||||||
check_eq(Editor_state.lines[1].data, 'abc', 'F - test_drop_file/lines:1')
|
check_eq(Editor_state.lines[1].data, 'abc', 'F - test_drop_file/lines:1')
|
||||||
check_eq(Editor_state.lines[2].data, 'def', 'F - test_drop_file/lines:2')
|
check_eq(Editor_state.lines[2].data, 'def', 'F - test_drop_file/lines:2')
|
||||||
check_eq(Editor_state.lines[3].data, 'ghi', 'F - test_drop_file/lines:3')
|
check_eq(Editor_state.lines[3].data, 'ghi', 'F - test_drop_file/lines:3')
|
||||||
|
edit.draw(Editor_state)
|
||||||
end
|
end
|
||||||
|
|
||||||
function test_drop_file_saves_previous()
|
function test_drop_file_saves_previous()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user