Test case for sort_lines