aboutsummaryrefslogtreecommitdiffstats
path: root/interfaces
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2010-01-19 10:37:31 -0500
committerW. Trevor King <wking@drexel.edu>2010-01-19 10:37:31 -0500
commitb3d2784971e7a4fc088da46122c8351e1aea405f (patch)
treeff167f149fb4ccd16f19e78877450ab77f0ddba9 /interfaces
parentebcf057be68161a2a2ceee34622f24d89a7022a0 (diff)
downloadbugseverywhere-b3d2784971e7a4fc088da46122c8351e1aea405f.tar.gz
Allow forward slashes (/) in commit email tags in be-handle-mail.
Also move unitsuite definition to the end of the file so it picks up GenerateGlobalTagsTestCase.
Diffstat (limited to 'interfaces')
-rwxr-xr-xinterfaces/email/interactive/be-handle-mail12
1 files changed, 6 insertions, 6 deletions
diff --git a/interfaces/email/interactive/be-handle-mail b/interfaces/email/interactive/be-handle-mail
index 161e118..036caa0 100755
--- a/interfaces/email/interactive/be-handle-mail
+++ b/interfaces/email/interactive/be-handle-mail
@@ -693,7 +693,7 @@ def generate_global_tags(tag_base=u'be-bug'):
SUBJECT_TAG_START = u'[%s' % tag_base
SUBJECT_TAG_RESPONSE = u'[%s]' % tag_base
SUBJECT_TAG_NEW = u'[%s:submit]' % tag_base
- SUBJECT_TAG_COMMENT = re.compile(u'\[%s:([\-0-9a-z]*)]' % tag_base)
+ SUBJECT_TAG_COMMENT = re.compile(u'\[%s:([\-0-9a-z/]*)]' % tag_base)
SUBJECT_TAG_CONTROL = SUBJECT_TAG_RESPONSE
def open_logfile(logpath=None):
@@ -724,9 +724,6 @@ def close_logfile():
if LOGFILE != None and LOGPATH not in [u'stderr', u'none']:
LOGFILE.close()
-unitsuite = unittest.TestLoader().loadTestsFromModule(sys.modules[__name__])
-suite = unittest.TestSuite([unitsuite, doctest.DocTestSuite()])
-
def test():
result = unittest.TextTestRunner(verbosity=2).run(suite)
num_errors = len(result.errors)
@@ -900,9 +897,12 @@ class GenerateGlobalTagsTestCase (unittest.TestCase):
def test_subject_tag_comment(self):
"Should set SUBJECT_TAG_COMMENT global correctly"
generate_global_tags(u'projectX-bug')
- m = SUBJECT_TAG_COMMENT.match('[projectX-bug:xyz-123]')
+ m = SUBJECT_TAG_COMMENT.match('[projectX-bug:abc/xyz-123]')
self.failUnlessEqual(len(m.groups()), 1)
- self.failUnlessEqual(m.group(1), u'xyz-123')
+ self.failUnlessEqual(m.group(1), u'abc/xyz-123')
+
+unitsuite = unittest.TestLoader().loadTestsFromModule(sys.modules[__name__])
+suite = unittest.TestSuite([unitsuite, doctest.DocTestSuite()])
if __name__ == "__main__":
main(sys.argv)