[Rt-commit] r13789 - in rt/3.8/trunk: t/mail
spang at bestpractical.com
spang at bestpractical.com
Thu Jul 3 15:38:18 EDT 2008
Author: spang
Date: Thu Jul 3 15:38:18 2008
New Revision: 13789
Modified:
rt/3.8/trunk/ (props changed)
rt/3.8/trunk/t/mail/crypt-gnupg.t
rt/3.8/trunk/t/mail/gnupg-bad.t
rt/3.8/trunk/t/mail/gnupg-incoming.t
rt/3.8/trunk/t/mail/gnupg-realmail.t
rt/3.8/trunk/t/mail/gnupg-reverification.t
Log:
r43592 at loki: spang | 2008-07-03 19:12:31 +0100
make mail gnupg tests use get_relocateable_dir
Modified: rt/3.8/trunk/t/mail/crypt-gnupg.t
==============================================================================
--- rt/3.8/trunk/t/mail/crypt-gnupg.t (original)
+++ rt/3.8/trunk/t/mail/crypt-gnupg.t Thu Jul 3 15:38:18 2008
@@ -18,9 +18,9 @@
use File::Spec ();
use Cwd;
-(my $volume, my $directories, my $file) = File::Spec->splitpath($0);
-my $homedir = File::Spec->catdir( cwd(), $directories, File::Spec->updir(),
+my $homedir = RT::Test::get_abs_relocateable_dir(File::Spec->updir(),
qw(data gnupg keyrings) );
+
mkdir $homedir;
use_ok('RT::Crypt::GnuPG');
Modified: rt/3.8/trunk/t/mail/gnupg-bad.t
==============================================================================
--- rt/3.8/trunk/t/mail/gnupg-bad.t (original)
+++ rt/3.8/trunk/t/mail/gnupg-bad.t Thu Jul 3 15:38:18 2008
@@ -14,9 +14,8 @@
use Cwd 'getcwd';
-(my $volume, my $directories, my $file) = File::Spec->splitpath($0);
-my $homedir = File::Spec->catdir( getcwd(), $directories, File::Spec->updir(),
- qw(data gnupg keyrings) );
+my $homedir = RT::Test::get_abs_relocateable_dir(File::Spec->updir(),
+ qw(data gnupg keyrings));
RT->Config->Set( LogToScreen => 'debug' );
RT->Config->Set( 'GnuPG',
Modified: rt/3.8/trunk/t/mail/gnupg-incoming.t
==============================================================================
--- rt/3.8/trunk/t/mail/gnupg-incoming.t (original)
+++ rt/3.8/trunk/t/mail/gnupg-incoming.t Thu Jul 3 15:38:18 2008
@@ -17,9 +17,8 @@
use String::ShellQuote 'shell_quote';
use IPC::Run3 'run3';
-(my $volume, my $directories, my $file) = File::Spec->splitpath($0);
-my $homedir = File::Spec->catdir( getcwd(), $directories, File::Spec->updir(),
- qw(data gnupg keyrings) );
+my $homedir = RT::Test::get_abs_relocateable_dir(File::Spec->updir(),
+ qw(data gnupg keyrings));
# catch any outgoing emails
RT::Test->set_mail_catcher;
Modified: rt/3.8/trunk/t/mail/gnupg-realmail.t
==============================================================================
--- rt/3.8/trunk/t/mail/gnupg-realmail.t (original)
+++ rt/3.8/trunk/t/mail/gnupg-realmail.t Thu Jul 3 15:38:18 2008
@@ -69,9 +69,8 @@
my ($eid, $usage, $format, $attachment) = @_;
diag "email_ok $eid: $usage, $format, $attachment" if $ENV{'TEST_VERBOSE'};
- (my $volume, my $directories, my $file_new) = File::Spec->splitpath($0);
- my $emaildatadir = File::Spec->catdir( File::Spec->curdir(), $directories,
- File::Spec->updir(), qw(data gnupg emails));
+ my $emaildatadir = RT::Test::get_relocateable_dir(File::Spec->updir(),
+ qw(data gnupg emails));
my ($file) = glob("$emaildatadir/$eid-*");
my $mail = RT::Test->file_content($file);
Modified: rt/3.8/trunk/t/mail/gnupg-reverification.t
==============================================================================
--- rt/3.8/trunk/t/mail/gnupg-reverification.t (original)
+++ rt/3.8/trunk/t/mail/gnupg-reverification.t Thu Jul 3 15:38:18 2008
@@ -49,9 +49,8 @@
my @ticket_ids;
-(my $volume, my $directories, my $file) = File::Spec->splitpath($0);
-my $emaildatadir = File::Spec->catdir( File::Spec->curdir(), $directories,
- File::Spec->updir(), qw(data gnupg emails) );
+my $emaildatadir = RT::Test::get_relocateable_dir(File::Spec->updir(),
+ qw(data gnupg emails));
my @files = glob("$emaildatadir/*-signed-*");
foreach my $file ( @files ) {
diag "testing $file" if $ENV{'TEST_VERBOSE'};
More information about the Rt-commit
mailing list