Skip to content

Commit

Permalink
Merge tardyp/buildbot:identifier (PR #1353)
Browse files Browse the repository at this point in the history
  • Loading branch information
djmitche committed Nov 14, 2014
2 parents debc302 + 6eac868 commit 8c3eae4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions master/buildbot/test/unit/test_util_identifiers.py
Expand Up @@ -65,6 +65,11 @@ def test_forceIdentifier_leading_digit(self):
identifiers.forceIdentifier(100, '9 pictures of cats.html'),
u'__pictures_of_cats_html')

def test_forceIdentifier_digits(self):
self.assertEqualUnicode(
identifiers.forceIdentifier(100, 'warnings(2000)'),
u'warnings_2000_')

def test_incrementIdentifier_simple(self):
self.assertEqualUnicode(
identifiers.incrementIdentifier(100, u'aaa'),
Expand Down
2 changes: 1 addition & 1 deletion master/buildbot/util/identifiers.py
Expand Up @@ -19,7 +19,7 @@

ident_re = re.compile('^[a-zA-Z_-][a-zA-Z0-9_-]*$')
initial_re = re.compile('^[^a-zA-Z_-]')
subsequent_re = re.compile('[^a-zA-Z-1-9_-]')
subsequent_re = re.compile('[^a-zA-Z-0-9_-]')
trailing_digits_re = re.compile('_([0-9]+)$')


Expand Down

0 comments on commit 8c3eae4

Please sign in to comment.