changeset 9:f772e2a1a13f

Tests: change directory to allow runing from outside. Use FindBin to find out where tests reside and chdir() into it. This allows to use configs from the directory with tests and to use _common.pm.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 10 Sep 2008 17:41:04 +0400
parents a58a62e9d695
children 6d6776623948
files smtp.t ssi-include-big.t
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/smtp.t
+++ b/smtp.t
@@ -14,6 +14,8 @@ use Test::More tests => 28;
 use MIME::Base64;
 use Socket qw/ CRLF /;
 
+BEGIN { use FindBin; chdir($FindBin::Bin); }
+
 use _common;
 
 ###############################################################################
--- a/ssi-include-big.t
+++ b/ssi-include-big.t
@@ -11,6 +11,8 @@ use strict;
 
 use Test::More tests => 3;
 
+BEGIN { use FindBin; chdir($FindBin::Bin); }
+
 use _common;
 
 ###############################################################################