Mercurial > hg > nginx-tests
comparison _common.pm @ 6:8813a78ab8b5
Tests: drop LWP dependency.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Sun, 07 Sep 2008 19:06:49 +0400 |
parents | 4d75bdb05ecf |
children | 9eb509695651 |
comparison
equal
deleted
inserted
replaced
5:4d75bdb05ecf | 6:8813a78ab8b5 |
---|---|
73 } | 73 } |
74 | 74 |
75 sub log_in { | 75 sub log_in { |
76 my ($msg) = @_; | 76 my ($msg) = @_; |
77 $msg =~ s/^/# << /gm; | 77 $msg =~ s/^/# << /gm; |
78 $msg =~ s/([\x00-\x1f\x7f-])/sprintf('\\x%02x', ord($1)) . (($1 eq "\n") ? "\n" : '')/gmxe; | 78 $msg =~ s/([^\x20-\x7e])/sprintf('\\x%02x', ord($1)) . (($1 eq "\n") ? "\n" : '')/gmxe; |
79 $msg .= "\n" unless $msg =~ /\n\Z/; | 79 $msg .= "\n" unless $msg =~ /\n\Z/; |
80 print $msg; | 80 print $msg; |
81 } | 81 } |
82 | 82 |
83 ############################################################################### | 83 ############################################################################### |