make broken-headerless-CGI content-length test a little more illustrative
Robert Buels [Wed, 8 Jun 2011 22:35:52 +0000 (22:35 +0000)]
t/06response.t

index c61034a..f0c6a1a 100644 (file)
@@ -46,7 +46,13 @@ is_deeply( [ $response->header('X-Field') ], [ 1, 2 ], 'Response Header X-Field'
 
     $c->setup;
 
-    print "Look at me I am crappy and don't have any headers.";
+    print <<EOT;
+
+Look at me I am crappy and don't have any headers.
+
+But I have newlines and stuff.  Oh yes.
+
+EOT
 
     $response = $c->restore->response;
 }
@@ -55,6 +61,6 @@ isa_ok( $response, 'HTTP::Response' );
 is( $response->code, 200, 'Response Code' );
 is( $response->message, 'OK', 'Response Message' );
 is( $response->protocol, 'HTTP/1.1', 'Response Protocol' );
-is( $response->content, "Look at me I am crappy and don't have any headers.", 'Response Content' );
-is( $response->content_length, 50, 'Response Content-Length is right!' );
+like( $response->content, qr/Oh yes/, 'Response Content' );
+is( $response->content_length, 93, 'Response Content-Length is right!' );
 is( $response->content_type, '', 'Response Content-Type is blank' );