~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_log.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2007 Canonical Ltd
 
1
# Copyright (C) 2005-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
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):