Add unit test for non-TTY crash.