Instead of using error-pattern, you should be using `//~ ERROR nullary enum variants ...`

This will check that the line numbers are correct, not just that the error was printed.