Can you use a heredoc to specify the expected output? I prefer not to have any code involved in generating the expected output, otherwise that code may itself be susceptible to bugs.