App-Pastebin-sprunge

 view release on metacpan or  search on metacpan

t/02-retrieve.t  view on Meta::CPAN

use IO::Socket::INET;
use App::Pastebin::sprunge;

BEGIN {
    @ARGV = qw(ILSD);
}

my $sock = IO::Socket::INET->new(
    PeerHost => 'sprunge.us',
    PeerPort => 80,
    Timeout  => 5,
    Type     => SOCK_STREAM,
);

SKIP: {
    skip "Couldn't connect to sprunge.us: $!", 1
        unless defined $sock;
    $sock->close;

    my ($out, $err) = output_from {
        eval { App::Pastebin::sprunge->new->run };

t/03-create.t  view on Meta::CPAN

BEGIN {
    $^W = 0; # Disable warnings because HTTP::Request::Common warns spuriously
    *STDIN = *DATA; # Fake out the library being tested - how sneaky!
    @ARGV = ();
}
use warnings;

my $sock = IO::Socket::INET->new(
    PeerHost => 'sprunge.us',
    PeerPort => 80,
    Timeout  => 5,
    Type     => SOCK_STREAM,
);

SKIP: {
    skip "Couldn't connect to sprunge.us: $!", 1
        unless defined $sock;
    $sock->close;

    my ($out, $err) = output_from {
        eval { App::Pastebin::sprunge->new->run };



( run in 0.237 second using v1.01-cache-2.11-cpan-4d50c553e7e )