Heray-Was-Here
Server : Apache
System : Linux vps103298.mylogin.co 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : calvet ( 273824)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /usr/share/doc/perl-Term-Shell/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/doc/perl-Term-Shell/t/03catchsmry.t
package main;

use strict;
use warnings;

use Test::More;

if ( $^O eq 'MSWin32' )
{
    plan skip_all => "Test gets stuck on Windows - RT #40771";
}
else
{
    plan tests => 1;
}

require Term::Shell;

{

    package Term::Shell::Test;
    use base 'Term::Shell';

    sub summary
    {
        my $self = shift;
        $::called = 1;
        $self->SUPER::summary(@_);
    }
    sub run_fuzz { }
};

my $sh = Term::Shell::Test->new;

{
    $sh->run_help;
};

# TEST
unless ( is( $::called, 1, "catch_smry gets called for unknown methods" ) )
{
    diag "Term::Shell did not call a custom catch_smry handler";
    diag "This is most likely because your version of Term::Shell";
    diag "has a bug. Please upgrade to v0.02 or higher, which";
    diag "should close this bug.";
    diag "If that is no option, patch sub help() in Term/Shell.pm, line 641ff.";
    diag "to:";
    diag '      #my $smry = exists $o->{handlers}{$h}{smry};';
    diag '    #? $o->summary($h);';
    diag '    #: "undocumented";';
    diag '      my $smry = $o->summary($h);';
    diag 'Fixing this is not necessary - you will get no online help';
    diag 'but the shell will otherwise work fine. Help is still';
    diag 'available through ``perldoc WWW::Mechanize::Shell``';
}

Hry