This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update HTTP-Tiny to CPAN version 0.033
[perl5.git] / cpan / HTTP-Tiny / t / 001_api.t
CommitLineData
a3ab329f 1#!perl
a3ab329f
DG
2
3use strict;
4use warnings;
5
6use Test::More tests => 2;
7use HTTP::Tiny;
8
fcfb9f49 9my @accessors = qw(
9a00675d 10 agent default_headers local_address max_redirect max_size proxy no_proxy timeout SSL_options verify_SSL cookie_jar
fcfb9f49 11);
35265876
CBW
12my @methods = qw(
13 new get head put post delete post_form request mirror www_form_urlencode
14);
a3ab329f
DG
15
16my %api;
17@api{@accessors} = (1) x @accessors;
35265876 18@api{@methods} = (1) x @methods;
a3ab329f
DG
19
20can_ok('HTTP::Tiny', @methods, @accessors);
21
22my @extra =
23 grep {! $api{$_} }
24 grep { $_ !~ /\A_/ }
25 grep {; no strict 'refs'; *{"HTTP::Tiny::$_"}{CODE} }
26 sort keys %HTTP::Tiny::;
27
28ok( ! scalar @extra, "No unexpected subroutines defined" )
29 or diag "Found: @extra";