~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_log.py

merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
902
902
        rev.committer = 'John Doe <jdoe@example.com>'
903
903
        lf = LogFormatter(None)
904
904
        self.assertEqual('John Doe', lf.short_committer(rev))
 
905
        rev.committer = 'John Smith <jsmith@example.com>'
 
906
        self.assertEqual('John Smith', lf.short_committer(rev))
 
907
        rev.committer = 'John Smith'
 
908
        self.assertEqual('John Smith', lf.short_committer(rev))
 
909
        rev.committer = 'jsmith@example.com'
 
910
        self.assertEqual('jsmith@example.com', lf.short_committer(rev))
 
911
        rev.committer = '<jsmith@example.com>'
 
912
        self.assertEqual('jsmith@example.com', lf.short_committer(rev))
 
913
        rev.committer = 'John Smith jsmith@example.com'
 
914
        self.assertEqual('John Smith', lf.short_committer(rev))
905
915
 
906
916
    def test_short_author(self):
907
917
        rev = Revision('a-id')
910
920
        self.assertEqual('John Doe', lf.short_author(rev))
911
921
        rev.properties['author'] = 'John Smith <jsmith@example.com>'
912
922
        self.assertEqual('John Smith', lf.short_author(rev))
 
923
        rev.properties['author'] = 'John Smith'
 
924
        self.assertEqual('John Smith', lf.short_author(rev))
 
925
        rev.properties['author'] = 'jsmith@example.com'
 
926
        self.assertEqual('jsmith@example.com', lf.short_author(rev))
 
927
        rev.properties['author'] = '<jsmith@example.com>'
 
928
        self.assertEqual('jsmith@example.com', lf.short_author(rev))
 
929
        rev.properties['author'] = 'John Smith jsmith@example.com'
 
930
        self.assertEqual('John Smith', lf.short_author(rev))