~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_annotate.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-08-31 18:27:04 UTC
  • mfrom: (1948.4.36 revspec-errors-55420)
  • Revision ID: pqm@pqm.ubuntu.com-20060831182704-2de4cd234a448ed1
(jam) improve revision spec errors

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
''')
72
72
 
73
73
    def test_annotate_cmd_revision(self):
74
 
        out, err = self.run_bzr_captured(['annotate', 'hello.txt', '-r 1'])
 
74
        out, err = self.run_bzr_captured(['annotate', 'hello.txt', '-r1'])
75
75
        self.assertEquals(err, '')
76
76
        self.assertEqualDiff(out, '''\
77
77
    1 test@us | my helicopter
78
78
''')
79
79
 
80
80
    def test_annotate_cmd_revision3(self):
81
 
        out, err = self.run_bzr_captured(['annotate', 'hello.txt', '-r 3'])
 
81
        out, err = self.run_bzr_captured(['annotate', 'hello.txt', '-r3'])
82
82
        self.assertEquals(err, '')
83
83
        self.assertEqualDiff(out, '''\
84
84
    1 test@us | my helicopter
86
86
''')
87
87
 
88
88
    def test_annotate_cmd_unknown_revision(self):
89
 
        out, err = self.run_bzr_captured(['annotate', 'hello.txt', '-r 10'],
 
89
        out, err = self.run_bzr_captured(['annotate', 'hello.txt', '-r', '10'],
90
90
                                         retcode=3)
91
91
        self.assertEquals(out, '')
92
 
        self.assertContainsRe(err, 'has no revision 10')
 
92
        self.assertContainsRe(err, 'Requested revision: \'10\' does not exist')
93
93
 
94
94
    def test_annotate_cmd_two_revisions(self):
95
 
        out, err = self.run_bzr_captured(['annotate', 'hello.txt', '-r 1..2'],
 
95
        out, err = self.run_bzr_captured(['annotate', 'hello.txt', '-r1..2'],
96
96
                                         retcode=3)
97
97
        self.assertEquals(out, '')
98
98
        self.assertEquals(err, 'bzr: ERROR: bzr annotate --revision takes'