Thank you Richard, you've made me rethink the question, which had something like this in the Preload box.
System.out.println( //student's answer here// );
If the student just presses Check straightaway, we get System.out.println(); , which of course produces "\n" (not empty). The Got column was then empty, while the expected column showed the expected output.
I've now rearranged this so that the println appears in the test case, and that works out fine. I'm assuming that "\n" is stripped from the output.