App-SD

 view release on metacpan or  search on metacpan

t/no-email.t  view on Meta::CPAN

    },
);

for my $item ( @cmds ) {
    my $exp_error
        = defined $item->{error}
        ? (join "\n", @{$item->{error}})
        : '';
    my ($out, $got_error) = run_command( @{$item->{cmd}} );
    {
        local $/ = "";     # chomp paragraph mode
        chomp $got_error;
        chomp $exp_error;
    }
    is( $got_error, $exp_error, $item->{comment} );
}

t/sd-usage.t  view on Meta::CPAN


my $in_interactive_shell = 0;

for my $item ( @cmds ) {
    my $exp_error
        = defined $item->{error}
        ? (join "\n", @{$item->{error}})
        : '';
    my (undef, $got_error) = run_command( @{$item->{cmd}} );
    {
        local $/ = "";     # chomp paragraph mode
        chomp $got_error;
        chomp $exp_error;
    }
    is( $got_error, $exp_error, $item->{comment} . ' (non-shell)' );
}

$in_interactive_shell = 1;

for my $item ( @cmds ) {
    my $exp_error
        = defined $item->{error}
        ? (join "\n", @{$item->{error}}) . "\n"
        : '';
    # in an interactive shell, usage messages shouldn't be printing a command
    # name
    $exp_error =~ s/sd-usage.t //g;
    my (undef, $got_error) = run_command( @{$item->{cmd}} );
    {
        local $/ = "";     # chomp paragraph mode
        chomp $got_error;
        chomp $exp_error;
    }
    is( $got_error, $exp_error, $item->{comment} . ' (in shell)');
}

no warnings 'redefine';
sub Prophet::CLI::interactive_shell {
    return $in_interactive_shell;
}

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 3.431 seconds using v1.00-cache-2.02-grep-82fe00e-cpan-d29e8ade9f55 )