changeset 83:6e5884419e4a

Tests: whitespace cleanup.
author Maxim Dounin <mdounin@mdounin.ru>
date Sun, 12 Apr 2009 06:46:21 +0400
parents a2fc9b9e9a2b
children e48ac6e9a390
files proxy-noclose.t proxy.t
diffstat 2 files changed, 24 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/proxy-noclose.t
+++ b/proxy-noclose.t
@@ -92,24 +92,24 @@ like(http_get('/uselen'), qr/SEE-THIS/, 
 
 sub http_noclose_daemon {
 	my $server = IO::Socket::INET->new(
-        	Proto => 'tcp',
-        	LocalAddr => '127.0.0.1:8081',
-        	Listen => 5,
-        	Reuse => 1
+		Proto => 'tcp',
+		LocalAddr => '127.0.0.1:8081',
+		Listen => 5,
+		Reuse => 1
 	)
-        	or die "Can't create listening socket: $!\n";
+		or die "Can't create listening socket: $!\n";
 
 	while (my $client = $server->accept()) {
-        	$client->autoflush(1);
+		$client->autoflush(1);
 
 		my $multi = 0;
 		my $nolen = 0;
 
-        	while (<$client>) {
+		while (<$client>) {
 			$multi = 1 if /multi/;
 			$nolen = 1 if /nolen/;
-                	last if (/^\x0d?\x0a?$/);
-        	}
+			last if (/^\x0d?\x0a?$/);
+		}
 
 		if ($nolen) {
 
@@ -121,7 +121,7 @@ TEST-OK-IF-YOU-SEE-THIS
 EOF
 		} elsif ($multi) {
 
-        		print $client <<"EOF";
+			print $client <<"EOF";
 HTTP/1.1 200 OK
 Content-Length: 32
 Connection: close
@@ -134,7 +134,7 @@ EOF
 
 		} else {
 
-        		print $client <<"EOF";
+			print $client <<"EOF";
 HTTP/1.1 200 OK
 Content-Length: 24
 Connection: close
@@ -144,8 +144,8 @@ EOF
 		}
 
 		my $select = IO::Select->new($client);
-        	$select->can_read(10);
-        	close $client;
+		$select->can_read(10);
+		close $client;
 	}
 }
 
--- a/proxy.t
+++ b/proxy.t
@@ -66,23 +66,23 @@ unlike(http_head('/'), qr/SEE-THIS/, 'pr
 
 sub http_daemon {
 	my $server = IO::Socket::INET->new(
-        	Proto => 'tcp',
+		Proto => 'tcp',
 		LocalHost => '127.0.0.1:8081',
-        	Listen => 5,
-        	Reuse => 1
+		Listen => 5,
+		Reuse => 1
 	)
-        	or die "Can't create listening socket: $!\n";
+		or die "Can't create listening socket: $!\n";
 
 	while (my $client = $server->accept()) {
-        	$client->autoflush(1);
+		$client->autoflush(1);
 
 		my $headers = '';
 		my $uri = '';
 
-        	while (<$client>) {
+		while (<$client>) {
 			$headers .= $_;
-                	last if (/^\x0d?\x0a?$/);
-        	}
+			last if (/^\x0d?\x0a?$/);
+		}
 
 		$uri = $1 if $headers =~ /^\S+\s+([^ ]+)\s+HTTP/i;
 
@@ -97,7 +97,7 @@ EOF
 
 		} elsif ($uri eq '/multi') {
 
-        		print $client <<"EOF";
+			print $client <<"EOF";
 HTTP/1.1 200 OK
 Connection: close
 
@@ -109,7 +109,7 @@ EOF
 
 		} else {
 
-        		print $client <<"EOF";
+			print $client <<"EOF";
 HTTP/1.1 404 Not Found
 Connection: close
 
@@ -117,7 +117,7 @@ Oops, '$uri' not found
 EOF
 		}
 
-        	close $client;
+		close $client;
 	}
 }