/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_log.py

  • Committer: Lukáš Lalinský
  • Date: 2007-12-01 11:06:45 UTC
  • mto: This revision was merged to the branch mainline in revision 3080.
  • Revision ID: lalinsky@gmail.com-20071201110645-l42xh5ayoambqosl
Fall back to showing e-mail in ``log --short/--line`` if the committer/author has only e-mail.

Show diffs side-by-side

added added

removed removed

Lines of Context:
808
808
        rev.committer = 'John Doe <jdoe@example.com>'
809
809
        lf = LogFormatter(None)
810
810
        self.assertEqual('John Doe', lf.short_committer(rev))
 
811
        rev.committer = 'John Smith <jsmith@example.com>'
 
812
        self.assertEqual('John Smith', lf.short_author(rev))
 
813
        rev.committer = 'John Smith'
 
814
        self.assertEqual('John Smith', lf.short_author(rev))
 
815
        rev.committer = 'jsmith@example.com'
 
816
        self.assertEqual('jsmith@example.com', lf.short_author(rev))
 
817
        rev.committer = '<jsmith@example.com>'
 
818
        self.assertEqual('jsmith@example.com', lf.short_author(rev))
811
819
 
812
820
    def test_short_author(self):
813
821
        rev = Revision('a-id')
816
824
        self.assertEqual('John Doe', lf.short_author(rev))
817
825
        rev.properties['author'] = 'John Smith <jsmith@example.com>'
818
826
        self.assertEqual('John Smith', lf.short_author(rev))
 
827
        rev.properties['author'] = 'John Smith'
 
828
        self.assertEqual('John Smith', lf.short_author(rev))
 
829
        rev.properties['author'] = 'jsmith@example.com'
 
830
        self.assertEqual('jsmith@example.com', lf.short_author(rev))
 
831
        rev.properties['author'] = '<jsmith@example.com>'
 
832
        self.assertEqual('jsmith@example.com', lf.short_author(rev))