function test_draw_word_wrapping_text()
io.write('\ntest_draw_word_wrapping_text')
App.screen.init{width=60, height=60}
Lines = load_array{'abc def ghi', 'jkl'}
Line_width = App.screen.width
Cursor1 = {line=1, pos=1}
Screen_top1 = {line=1, pos=1}
Screen_bottom1 = {}
Zoom = 1
App.draw()
local screen_top_margin = 15 -- pixels
local line_height = 15 -- pixels
local y = screen_top_margin
App.screen.check(y, 'abc ', 'F - test_draw_word_wrapping_text/screen:1')
y = y + line_height
App.screen.check(y, 'def ', 'F - test_draw_word_wrapping_text/screen:2')
y = y + line_height
App.screen.check(y, 'ghi', 'F - test_draw_word_wrapping_text/screen:3')
end
function test_draw_text_wrapping_within_word()
-- arrange a screen line that needs to be split within a word
io.write('\ntest_draw_text_wrapping_within_word')
App.screen.init{width=60, height=60}
Lines = load_array{'abcd e fghijk', 'xyz'}
Line_width = App.screen.width
Cursor1 = {line=1, pos=1}
Screen_top1 = {line=1, pos=1}
Screen_bottom1 = {}
Zoom = 1
App.draw()
local screen_top_margin = 15 -- pixels
local line_height = 15 -- pixels
local y = screen_top_margin
App.screen.check(y, 'abcd ', 'F - test_draw_text_wrapping_within_word/screen:1')
y = y + line_height
App.screen.check(y, 'e fghi', 'F - test_draw_text_wrapping_within_word/screen:2')
y = y + line_height
App.screen.check(y, 'jk', 'F - test_draw_text_wrapping_within_word/screen:3')
end