~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Andrew Bennetts
  • Date: 2010-08-12 04:19:07 UTC
  • mto: This revision was merged to the branch mainline in revision 5377.
  • Revision ID: andrew.bennetts@canonical.com-20100812041907-lgauj5jm4voyjxbm
Don't traceback if a repository doesn't support reconcile_canonicalize_chks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
    DiffTree,
30
30
    format_registry as diff_format_registry,
31
31
    )
32
 
from bzrlib.tests import (
33
 
    features,
34
 
    )
35
32
 
36
33
 
37
34
def subst_dates(string):
158
155
        self.assertContainsRe(err,
159
156
            "Requested revision: '1.1' does not exist in branch:")
160
157
 
 
158
    def test_diff_diff_options_and_using(self):
 
159
        out, err = self.run_bzr('diff --diff-options -wu --using /usr/bin/diff', retcode=3,
 
160
          error_regexes=('are mutually exclusive.',))
 
161
 
161
162
    def test_diff_unversioned(self):
162
163
        # Get an error when diffing a non-versioned file.
163
164
        # (Malone #3619)
402
403
        self.assertEndsWith(out, "\n@@ -0,0 +1 @@\n"
403
404
                                 "+baz\n\n")
404
405
 
405
 
    def test_external_diff_options_and_using(self):
406
 
        """Test that the options are passed correctly to an external diff process"""
407
 
        self.requireFeature(features.diff_feature)
408
 
        self.make_example_branch()
409
 
        self.build_tree_contents([('hello', 'Foo\n')])
410
 
        out, err = self.run_bzr('diff --diff-options -i --using diff',
411
 
                                    retcode=1)
412
 
        self.assertEquals("=== modified file 'hello'\n", out)
413
 
        self.assertEquals('', err)
414
 
 
415
406
 
416
407
class TestDiffOutput(DiffBase):
417
408