Mercurial > hg > nginx-tests
changeset 12:d19146b30334
Tests: move write_file() into _common.pm.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 11 Sep 2008 19:55:04 +0400 |
parents | f6bb0ffdb9b4 |
children | e8edb765595d |
files | _common.pm ssi-include-big.t |
diffstat | 2 files changed, 11 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/_common.pm Thu Sep 11 19:53:50 2008 +0400 +++ b/_common.pm Thu Sep 11 19:55:04 2008 +0400 @@ -11,8 +11,8 @@ use base qw/ Exporter /; -our @EXPORT = qw/ start_nginx smtp_connect smtp_send smtp_read smtp_check - smtp_ok log_in log_out http /; +our @EXPORT = qw/ start_nginx write_file smtp_connect smtp_send smtp_read + smtp_check smtp_ok log_in log_out http /; ############################################################################### @@ -63,6 +63,15 @@ stop_nginx(); } +sub write_file { + my ($name, $content) = @_; + + open F, '>' . $testdir . '/' . $name + or die "Can't create $name: $!"; + print F $content; + close F; +} + ############################################################################### sub log_out {
--- a/ssi-include-big.t Thu Sep 11 19:53:50 2008 +0400 +++ b/ssi-include-big.t Thu Sep 11 19:55:04 2008 +0400 @@ -56,13 +56,4 @@ EOF } -sub write_file { - my ($name, $content) = @_; - - open F, '>' . $_common::testdir . '/' . $name - or die "Can't create $name: $!"; - print F $content; - close F; -} - ###############################################################################