summaryrefslogtreecommitdiff
path: root/t/new/08duphandle.t
diff options
context:
space:
mode:
Diffstat (limited to 't/new/08duphandle.t')
-rw-r--r--t/new/08duphandle.t14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/new/08duphandle.t b/t/new/08duphandle.t
new file mode 100644
index 0000000..39381e8
--- /dev/null
+++ b/t/new/08duphandle.t
@@ -0,0 +1,14 @@
+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 $curl2 = $curl->duphandle;
+ my $code = $curl2->perform;
+ ok( $code == 0 );
+}