test for a tty before