test_y_of_schema1 = function() local state = edit.initialize_test_state() state.lines = load_array{'1', '2', '3'} Text.redraw_all(state) check_eq(y_of_schema1(state, {line=1, pos=1}), 0, 'start of first line') check_eq(y_of_schema1(state, {line=1, pos=2}), 0, 'middle of first line') check_eq(y_of_schema1(state, {line=2, pos=2}), state.line_height, 'middle of second line') end