File: 01basic.t

package info (click to toggle)
libwww-curl-perl 4.17-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 584 kB
  • sloc: perl: 1,909; makefile: 5
file content (13 lines) | stat: -rw-r--r-- 407 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
use strict;
use Test::More tests => 1;
use WWW::Curl::Easy;

SKIP: {
    skip 'You need to set CURL_TEST_URL', 1 unless $ENV{CURL_TEST_URL};
    my $curl = new WWW::Curl::Easy;
    $curl->setopt( CURLOPT_URL, $ENV{CURL_TEST_URL} );
    my @headers = ( 'Server: cURL', 'User-Agent: WWW::Curl/3.00' );
    $curl->setopt( CURLOPT_HTTPHEADER, \@headers );
    my $code = $curl->perform;
    ok( $code == 0 );
}