diff options
author | Craig A. Berry <craigberry@mac.com> | 2009-12-30 21:43:43 -0600 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2009-12-30 21:43:43 -0600 |
commit | 2dba5d6056865b047ab6a58cf258c870472b3fe2 (patch) | |
tree | 1fb14c04f137a6212d94cb9eb97d8eeebf0f48e8 /t | |
parent | e936069588e55fda670c085e230b9c346d55a820 (diff) | |
download | perl-2dba5d6056865b047ab6a58cf258c870472b3fe2.tar.gz |
TT is not a terminal in lots of situations.
d1585ceaf66a98c6f5f3520ecf3dec4ccc98a1d6 didn't go far enough. TT may
be a mailbox when we're in a subprocess, for example. So skip on VMS
unless TT translates to one of the more common terminal device names.
Diffstat (limited to 't')
-rwxr-xr-x | t/op/filetest_t.t | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/t/op/filetest_t.t b/t/op/filetest_t.t index d9071570fb..350856411d 100755 --- a/t/op/filetest_t.t +++ b/t/op/filetest_t.t @@ -17,12 +17,15 @@ my($dev_tty, $dev_null) = qw(/dev/tty /dev/null); SKIP: { open(my $tty, "<", $dev_tty) or skip("Can't open terminal '$dev_tty': $!"); - skip("Probably batch mode since TT is _NLA0:") - if $^O eq 'VMS' && lc(VMS::Filespec::vmspath('TT')) eq '_nla0:'; - ok(-t $tty); + if ($^O eq 'VMS') { + # TT might be a mailbox or other non-terminal device + my $tt_dev = VMS::Filespec::vmspath('TT'); + skip("'$tt_dev' is probably not a terminal") if $tt_dev !~ m/^_(tt|ft|rt)/i; + } + ok(-t $tty, "'$dev_tty' is a TTY"); } SKIP: { open(my $null, "<", $dev_null) or skip("Can't open null device '$dev_null': $!"); - ok(!-t $null); + ok(!-t $null, "'$dev_null' is not a TTY"); } |