IO-Prompt-Simple

 view release on metacpan or  search on metacpan

t/Util.pm  view on Meta::CPAN


    local *STDIN  = *$in;
    local *STDOUT = *$out;

    if (ref $opts eq 'HASH') {
        $opts->{input}  = $in;
        $opts->{output} = $out;
    }

    local $Test::Builder::Level = $Test::Builder::Level + 1;
    my $line = (caller)[2];

    no warnings 'redefine';
    local *IO::Prompt::Simple::_isa_tty = sub { $isa_tty };

    note "$desc at line $line"; do {
        my @got = prompt 'prompt', $opts;
        if (ref $prompt eq 'Regexp') {
            like $output, $prompt, 'prompt ok';
        }
        else {



( run in 1.159 second using v1.01-cache-2.11-cpan-1e74a51a04c )