fix test cases for empty input (add end line)