13 my($dev_tty, $dev_null) = qw(/dev/tty /dev/null);
14 ($dev_tty, $dev_null) = qw(con nul ) if $^O =~ /^(MSWin32|os2)$/;
15 ($dev_tty, $dev_null) = qw(TT: _NLA0: ) if $^O eq "VMS";
18 open(my $tty, "<", $dev_tty)
19 or skip("Can't open terminal '$dev_tty': $!");
21 # TT might be a mailbox or other non-terminal device
22 my $tt_dev = VMS::Filespec::vmspath('TT');
23 skip("'$tt_dev' is probably not a terminal") if $tt_dev !~ m/^_(tt|ft|rt)/i;
25 ok(-t $tty, "'$dev_tty' is a TTY");
28 open(my $null, "<", $dev_null)
29 or skip("Can't open null device '$dev_null': $!");
30 ok(!-t $null, "'$dev_null' is not a TTY");