~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_log.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-04-01 00:40:31 UTC
  • mfrom: (4081.2.5 bug513322-first)
  • Revision ID: pqm@pqm.ubuntu.com-20100401004031-pc7s84z6ahqunmy2
(mbp, for gagern) show first apparent author in gnu changelog

Show diffs side-by-side

added added

removed removed

Lines of Context:
877
877
            formatter_kwargs=dict(levels=0))
878
878
 
879
879
 
 
880
class TestGnuChangelogFormatter(TestCaseForLogFormatter):
 
881
 
 
882
    def test_gnu_changelog(self):
 
883
        wt = self.make_standard_commit('nicky', authors=[])
 
884
        self.assertFormatterResult('''\
 
885
2005-11-22  Lorem Ipsum  <test@example.com>
 
886
 
 
887
\tadd a
 
888
 
 
889
''',
 
890
            wt.branch, log.GnuChangelogLogFormatter)
 
891
 
 
892
    def test_with_authors(self):
 
893
        wt = self.make_standard_commit('nicky',
 
894
            authors=['Fooa Fooz <foo@example.com>',
 
895
                     'Bari Baro <bar@example.com>'])
 
896
        self.assertFormatterResult('''\
 
897
2005-11-22  Fooa Fooz  <foo@example.com>
 
898
 
 
899
\tadd a
 
900
 
 
901
''',
 
902
            wt.branch, log.GnuChangelogLogFormatter)
 
903
 
 
904
    def test_verbose(self):
 
905
        wt = self.make_standard_commit('nicky')
 
906
        self.assertFormatterResult('''\
 
907
2005-11-22  John Doe  <jdoe@example.com>
 
908
 
 
909
\t* a:
 
910
 
 
911
\tadd a
 
912
 
 
913
''',
 
914
            wt.branch, log.GnuChangelogLogFormatter,
 
915
            show_log_kwargs=dict(verbose=True))
 
916
 
880
917
class TestGetViewRevisions(tests.TestCaseWithTransport, TestLogMixin):
881
918
 
882
919
    def _get_view_revisions(self, *args, **kwargs):