[Rt-commit] r2044 - in rt/branches/3.4-RELEASE: . lib/t/regression
jesse at bestpractical.com
jesse at bestpractical.com
Thu Jan 6 16:00:58 EST 2005
Author: jesse
Date: Thu Jan 6 16:00:57 2005
New Revision: 2044
Modified:
rt/branches/3.4-RELEASE/ (props changed)
rt/branches/3.4-RELEASE/lib/t/regression/04send_email.t
rt/branches/3.4-RELEASE/lib/t/regression/06mailgateway.t
Log:
r2543 at hualien: jesse | 2005-01-06T07:08:12.346569Z
no longer hardcode paths in tests
Modified: rt/branches/3.4-RELEASE/lib/t/regression/04send_email.t
==============================================================================
--- rt/branches/3.4-RELEASE/lib/t/regression/04send_email.t (original)
+++ rt/branches/3.4-RELEASE/lib/t/regression/04send_email.t Thu Jan 6 16:00:57 2005
@@ -40,7 +40,7 @@
# Let's test to make sure a multipart/report is processed correctly
-my $content = `cat /opt/rt3/lib/t/data/multipart-report` || die "couldn't find new content";
+my $content = `cat $RT::BasePath/lib/t/data/multipart-report` || die "couldn't find new content";
# be as much like the mail gateway as possible.
use RT::Interface::Email;
@@ -95,7 +95,7 @@
# create an iso 8859-1 ticket
@scrips_fired = ();
-$content = `cat /opt/rt3/lib/t/data/new-ticket-from-iso-8859-1` || die "couldn't find new content";
+$content = `cat $RT::BasePath/lib/t/data/new-ticket-from-iso-8859-1` || die "couldn't find new content";
@@ -143,7 +143,7 @@
# create an iso 8859-1 ticket
@scrips_fired = ();
- $content = `cat /opt/rt3/lib/t/data/new-ticket-from-iso-8859-1` || die "couldn't find new content";
+ $content = `cat $RT::BasePath/lib/t/data/new-ticket-from-iso-8859-1` || die "couldn't find new content";
# be as much like the mail gateway as possible.
use RT::Interface::Email;
@@ -237,7 +237,7 @@
# {{{ test a multipart alternative containing a text-html part with an umlaut
- $content = `cat /opt/rt3/lib/t/data/multipart-alternative-with-umlaut` || die "couldn't find new content";
+ $content = `cat $RT::BasePath/lib/t/data/multipart-alternative-with-umlaut` || die "couldn't find new content";
$parser->ParseMIMEEntityFromScalar($content);
@@ -265,7 +265,7 @@
# {{{ test a text-html message with an umlaut
- $content = `cat /opt/rt3/lib/t/data/text-html-with-umlaut` || die "couldn't find new content";
+ $content = `cat $RT::BasePath/lib/t/data/text-html-with-umlaut` || die "couldn't find new content";
$parser->ParseMIMEEntityFromScalar($content);
@@ -303,7 +303,7 @@
# {{{ test a text-html message with russian characters
- $content = `cat /opt/rt3/lib/t/data/text-html-in-russian` || die "couldn't find new content";
+ $content = `cat $RT::BasePath/lib/t/data/text-html-in-russian` || die "couldn't find new content";
$parser->ParseMIMEEntityFromScalar($content);
@@ -346,7 +346,7 @@
unshift (@RT::EmailInputEncodings, 'koi8-r');
$RT::EmailOutputEncoding = 'koi8-r';
-$content = `cat /opt/rt3/lib/t/data/russian-subject-no-content-type` || die "couldn't find new content";
+$content = `cat $RT::BasePath/lib/t/data/russian-subject-no-content-type` || die "couldn't find new content";
$parser->ParseMIMEEntityFromScalar($content);
@@ -385,7 +385,7 @@
# {{{ test a message containing a nested RFC 822 message
- $content = `cat /opt/rt3/lib/t/data/nested-rfc-822` || die "couldn't find new content";
+ $content = `cat $RT::BasePath/lib/t/data/nested-rfc-822` || die "couldn't find new content";
ok ($content, "Loaded nested-rfc-822 to test");
$parser->ParseMIMEEntityFromScalar($content);
@@ -424,7 +424,7 @@
# {{{ test a multipart alternative containing a uuencoded mesage generated by lotus notes
- $content = `cat /opt/rt3/lib/t/data/notes-uuencoded` || die "couldn't find new content";
+ $content = `cat $RT::BasePath/lib/t/data/notes-uuencoded` || die "couldn't find new content";
$parser->ParseMIMEEntityFromScalar($content);
@@ -452,7 +452,7 @@
# {{{ test a multipart that crashes the file-based mime-parser works
- $content = `cat /opt/rt3/lib/t/data/crashes-file-based-parser` || die "couldn't find new content";
+ $content = `cat $RT::BasePath/lib/t/data/crashes-file-based-parser` || die "couldn't find new content";
$parser->ParseMIMEEntityFromScalar($content);
@@ -482,7 +482,7 @@
# {{{ test a multi-line RT-Send-CC header
- $content = `cat /opt/rt3/lib/t/data/rt-send-cc` || die "couldn't find new content";
+ $content = `cat $RT::BasePath/lib/t/data/rt-send-cc` || die "couldn't find new content";
$parser->ParseMIMEEntityFromScalar($content);
Modified: rt/branches/3.4-RELEASE/lib/t/regression/06mailgateway.t
==============================================================================
--- rt/branches/3.4-RELEASE/lib/t/regression/06mailgateway.t (original)
+++ rt/branches/3.4-RELEASE/lib/t/regression/06mailgateway.t Thu Jan 6 16:00:57 2005
@@ -280,7 +280,10 @@
Data => ['This is a test of a binary attachment']);
# currently in lib/t/autogen
-$entity->attach(Path => '/opt/rt3/share/html/NoAuth/images/bplogo.gif',
+
+my $LOGO_FILE = $RT::MasonComponentRoot.'/NoAuth/images/bplogo.gif';
+
+$entity->attach(Path => $LOGO_FILE,
Type => 'image/gif',
Encoding => 'base64');
@@ -302,7 +305,7 @@
ok ($tick->Id, "found ticket ".$tick->Id);
ok ($tick->Subject eq 'binary attachment test', "Created the ticket - ".$tick->Id);
-my $file = `cat '/opt/rt3/share/html/NoAuth/images/bplogo.gif'`;
+my $file = `cat $LOGO_FILE`;
ok ($file, "Read in the logo image");
More information about the Rt-commit
mailing list