File: author-20.non-fatal.t

package info (click to toggle)
libwww-curl-simple-perl 0.100191-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, trixie
  • size: 240 kB
  • sloc: perl: 685; makefile: 4
file content (31 lines) | stat: -rw-r--r-- 522 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/perl -w

BEGIN {
  unless ($ENV{AUTHOR_TESTING}) {
    require Test::More;
    Test::More::plan(skip_all => 'these tests are for testing by the author');
  }
}


use strict;
use Test::More;
use WWW::Curl::Simple;

my @urls = (
'http://en.wikipedia.org/wiki/Main_Page',
'http://www.yahoomypoo.com',
);

plan tests => 1;

my $curl = WWW::Curl::Simple->new(fatal => 0);

{
    $curl->add_request(HTTP::Request->new(GET => $_)) foreach (@urls);
    
    my @res = $curl->perform;
    
    ok("we live! :p");
    
}