test for terminal