7 use lib "$FindBin::Bin/../lib";
10 use Catalyst::Test 'TestApp';
13 #zip => ['Archive::Zip', 464, qr/^PK\x03\x04.*[\x80-\xFF]+.*x.txt/s],
14 ### Archive::Zip currently unreliable as a test platform until RT #54827 is fixed and popularized ###
15 ### https://rt.cpan.org/Ticket/Display.html?id=54827 ###
17 csv => ['Text::CSV', 96, qr/"Banana \(single\)","\$ \.40"$/m],
18 xml => ['XML::Simple', 1657, qr(</geocode>)],
21 plan tests => scalar keys %$types;
23 for my $action ( keys %$types ) {
24 my ($module, $length, $regexp) = @{$types->{$action}};
26 subtest uc($action)." Set" => sub {
28 eval "require $module"; # require hates string class names; must use eval string instead of block
30 plan ($@ ? (skip_all => $module.' not installed') : (tests => 4) );
32 ok( my $response = request('http://localhost/engine/response/perlio/' . $action ), "Request" );
33 ok( $response->is_success, "Response Successful 2xx" );
34 is( length( $response->content ), $length, "Length OK" );
35 like( $response->content, $regexp, "RegExp Check OK" );