I think you'll have to provide more context? Under what conditions was the student given the test? Was it an exception made for just him? There are too many unanswered questions for me to feel confident in any sort of answer. I assume, though, that his emailing it to the teacher would have been testimony to his good intention, and indeed served as a warning to the teacher to change the test itself, as I assume if the students had time to study with it, he or she also had a chance to change it. In fact, in that light, it almost seems like the teacher is blaming his or her own failings on the student, instead of simply changing the test and dealing with the mistake rationally. Students will make mistakes, they are there to learn, not there because they already know.