X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F06octetstream.t;h=16257b41f4a082b8de41c4cfa989f7d0d86866f2;hb=05f6d2389cf075266ace8b028a946108a25399bc;hp=87331a24809ae8deb557aeb35eb3755511995129;hpb=239fb0d6bfb5b06427a2140367da87b9c9c9337c;p=catagits%2FHTTP-Body.git diff --git a/t/06octetstream.t b/t/06octetstream.t index 87331a2..16257b4 100644 --- a/t/06octetstream.t +++ b/t/06octetstream.t @@ -1,20 +1,23 @@ use strict; use warnings; -use Test::More tests => 8; +use FindBin; +use lib "$FindBin::Bin/lib"; + +use Test::More tests => 12; use Cwd; use HTTP::Body; use File::Spec::Functions; use IO::File; -use YAML; +use PAML; my $path = catdir( getcwd(), 't', 'data', 'octetstream' ); -for ( my $i = 1 ; $i <= 2 ; $i++ ) { +for ( my $i = 1 ; $i <= 3 ; $i++ ) { my $test = sprintf( "%.3d", $i ); - my $headers = YAML::LoadFile( catfile( $path, "$test-headers.yml" ) ); + my $headers = PAML::LoadFile( catfile( $path, "$test-headers.pml" ) ); my $results = slurp_fh( IO::File->new( catfile( $path, "$test-results.dat" ) ) ); my $content = IO::File->new( catfile( $path, "$test-content.dat" ) ); @@ -33,7 +36,7 @@ for ( my $i = 1 ; $i <= 2 ; $i++ ) { cmp_ok( $body->state, 'eq', 'done', "$test UrlEncoded state" ); cmp_ok( $body->length, '==', - $headers->{'Content-Length'}, + $body->content_length, "$test UrlEncoded length" ); }