summaryrefslogtreecommitdiff
path: root/t/new/04abort.t
diff options
context:
space:
mode:
Diffstat (limited to 't/new/04abort.t')
-rw-r--r--t/new/04abort.t17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/new/04abort.t b/t/new/04abort.t
new file mode 100644
index 0000000..77b21c1
--- /dev/null
+++ b/t/new/04abort.t
@@ -0,0 +1,17 @@
+use strict;
+use Test::More tests => 1;
+use WWW::Curl::Easy;
+
+sub body_callback {
+ my ( $chunk, $handle ) = @_;
+ return -1;
+}
+
+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} );
+ $curl->setopt( CURLOPT_WRITEFUNCTION, \&body_callback );
+ my $code = $curl->perform;
+ ok($code);
+}