[Rt-commit] rt branch, 4.2/improve-subject-parsing, updated. rt-4.0.0rc7-250-g1a26475
Alex Vandiver
alexmv at bestpractical.com
Wed Aug 3 19:00:19 EDT 2011
The branch, 4.2/improve-subject-parsing has been updated
via 1a26475531afac0bae3232532000819d48544289 (commit)
from 99bc8f5693e5840ec7ced3272b229b6db8b69d82 (commit)
Summary of changes:
t/api/rtname.t | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit 1a26475531afac0bae3232532000819d48544289
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Aug 3 19:00:14 2011 -0400
Tests for capturing parens in EmailSubjectTagRegex
diff --git a/t/api/rtname.t b/t/api/rtname.t
index 8b7b54b..f2bffd5 100644
--- a/t/api/rtname.t
+++ b/t/api/rtname.t
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use RT::Test nodata => 1, tests => 9;
+use RT::Test nodata => 1, tests => 12;
use RT::Interface::Email;
@@ -31,3 +31,8 @@ is(RT::Interface::Email::ParseTicketId("[site #123] test"), 123);
is(RT::Interface::Email::ParseTicketId("[newsite #123] test"), 123);
is(RT::Interface::Email::ParseTicketId("[othersite #123] test"), undef);
+# Parens work fine
+RT->Config->Set( EmailSubjectTagRegex => qr/(new|)(site)/ );
+is(RT::Interface::Email::ParseTicketId("[site #123] test"), 123);
+is(RT::Interface::Email::ParseTicketId("[newsite #123] test"), 123);
+is(RT::Interface::Email::ParseTicketId("[othersite #123] test"), undef);
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list