add test for jumping across a line.
refactor the process using searchpos()