126
126
# Get an error from a file that does not exist at all
128
128
self.make_example_branch()
129
out, err = self.run_bzr('diff does-not-exist', retcode=3)
130
self.assertContainsRe(err, 'not versioned.*does-not-exist')
129
out, err = self.run_bzr('diff does-not-exist', retcode=3,
130
error_regexes=('not versioned.*does-not-exist',))
132
132
def test_diff_illegal_revision_specifiers(self):
133
out, err = self.run_bzr('diff -r 1..23..123', retcode=3)
134
self.assertContainsRe(err, 'one or two revision specifiers')
133
out, err = self.run_bzr('diff -r 1..23..123', retcode=3,
134
error_regexes=('one or two revision specifiers',))
136
def test_diff_nonexistent_revision(self):
137
out, err = self.run_bzr('diff -r 123', retcode=3,
138
error_regexes=("Requested revision: '123' does not "
139
"exist in branch:",))
141
def test_diff_nonexistent_dotted_revision(self):
142
out, err = self.run_bzr('diff -r 1.1', retcode=3)
143
self.assertContainsRe(err,
144
"Requested revision: '1.1' does not exist in branch:")
146
def test_diff_nonexistent_dotted_revision_change(self):
147
out, err = self.run_bzr('diff -c 1.1', retcode=3)
148
self.assertContainsRe(err,
149
"Requested revision: '1.1' does not exist in branch:")
136
151
def test_diff_unversioned(self):
137
152
# Get an error when diffing a non-versioned file.