~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/testannotate.py

- annotate improvements from Goffreddo, with extra bug fixes and tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
 
40
40
 
41
41
class TestAnnotate(TestCaseInTempDir):
 
42
    def setUp(self):
 
43
        super(TestAnnotate, self).setUp()
 
44
        b = Branch.initialize('.')
 
45
        self.build_tree_contents([('hello.txt', 'my helicopter\n')])
 
46
        b.add(['hello.txt'])
 
47
        b.commit('add hello', 
 
48
                 committer='test@user')
 
49
 
42
50
    def test_help_annotate(self):
43
51
        """Annotate command exists"""
44
52
        out, err = self.run_bzr_captured(['--no-plugins', 'annotate', '--help'])
 
53
 
 
54
    def test_annotate_cmd(self):
 
55
        out, err = self.run_bzr_captured(['annotate', 'hello.txt'])
 
56
        self.assertEquals(err, '')
 
57
        self.assertEqualDiff(out, '''\
 
58
    1 test@us | my helicopter
 
59
''')