~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Mark Hammond
  • Date: 2008-12-28 05:21:23 UTC
  • mfrom: (3920 +trunk)
  • mto: (3932.1.1 prepare-1.11)
  • mto: This revision was merged to the branch mainline in revision 3937.
  • Revision ID: mhammond@skippinet.com.au-20081228052123-f78xs5sbdkotshwf
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
126
126
        # Get an error from a file that does not exist at all
127
127
        # (Malone #3619)
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',))
131
131
 
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',))
 
135
 
 
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:",))
 
140
 
 
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:")
 
145
 
 
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:")
135
150
 
136
151
    def test_diff_unversioned(self):
137
152
        # Get an error when diffing a non-versioned file.