diff options
author | Jinkun Jang <jinkun.jang@samsung.com> | 2013-03-12 15:16:01 +0900 |
---|---|---|
committer | Jinkun Jang <jinkun.jang@samsung.com> | 2013-03-12 15:16:01 +0900 |
commit | 0034f59c7ed77eb8f8fe1ec082749d8520e3412e (patch) | |
tree | 6b318e64217938d6cd8ca074214778d2db99de84 /t/new/02header-callback.t | |
parent | 3555375b5b187f5eb25bc6673e2479d54f20ada3 (diff) | |
download | perl-WWW-Curl-0034f59c7ed77eb8f8fe1ec082749d8520e3412e.tar.gz perl-WWW-Curl-0034f59c7ed77eb8f8fe1ec082749d8520e3412e.tar.bz2 perl-WWW-Curl-0034f59c7ed77eb8f8fe1ec082749d8520e3412e.zip |
Tizen 2.1 basesubmit/tizen_2.1/20130423.103931submit/tizen/20130517.051924accepted/tizen_2.1/20130423.151409accepted/tizen/20130520.1018262.1b_releasetizen_2.1
Diffstat (limited to 't/new/02header-callback.t')
-rw-r--r-- | t/new/02header-callback.t | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/t/new/02header-callback.t b/t/new/02header-callback.t new file mode 100644 index 0000000..497e2dd --- /dev/null +++ b/t/new/02header-callback.t @@ -0,0 +1,20 @@ +use strict; +use Test::More tests => 1; +use WWW::Curl::Easy; + +my $header; + +sub header_callback { + my $chunk = shift; + $header .= $chunk; + return length $chunk; +} + +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_HEADERFUNCTION, \&header_callback ); + $curl->perform; + ok($header); +} |