-
-
Save zoffixznet/e377f82d12d0d2fa0b02de0bdf5e697b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Test; | |
plan 1; | |
subtest '.t returns True for TTY' => { | |
plan 1; | |
my $tt = shell :out, :err, 'tty'; | |
if $tt and (my $path = $tt.out.slurp(:close).trim) | |
and $path ne 'not a tty' { | |
my $fh will leave {.close} = $path.IO.open; | |
is-deeply $fh.eof, False, 'unread-from TTY handle .eof is False'; | |
} | |
else { | |
skip 'could not figure out how to get a TTY handle'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment