Making the test module actually check error messages.

Fixes #288.