~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/testannotate.py

Merge from mpool.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
    def setUp(self):
43
43
        super(TestAnnotate, self).setUp()
44
44
        b = Branch.initialize('.')
45
 
        self.build_tree_contents([('hello.txt', 'my helicopter\n')])
 
45
        self.build_tree_contents([('hello.txt', 'my helicopter\n'),
 
46
                                  ('nomail.txt', 'nomail\n')])
46
47
        b.working_tree().add(['hello.txt'])
47
48
        b.working_tree().commit('add hello', 
48
49
                                committer='test@user')
 
50
        b.working_tree().add(['nomail.txt'])
 
51
        b.working_tree().commit('add nomail', committer='no mail')
49
52
 
50
53
    def test_help_annotate(self):
51
54
        """Annotate command exists"""
57
60
        self.assertEqualDiff(out, '''\
58
61
    1 test@us | my helicopter
59
62
''')
 
63
 
 
64
    def test_no_mail(self):
 
65
        out, err = self.run_bzr_captured(['annotate', 'nomail.txt'])
 
66
        self.assertEquals(err, '')
 
67
        self.assertEqualDiff(out, '''\
 
68
    2 no mail | nomail
 
69
''')