~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-08-20 08:06:53 UTC
  • mfrom: (5383.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100820080653-klig2pem60bl1hz6
(mbp) handle diff --using --diff-options

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
    )
32
35
 
33
36
 
34
37
def subst_dates(string):
155
158
        self.assertContainsRe(err,
156
159
            "Requested revision: '1.1' does not exist in branch:")
157
160
 
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
 
 
162
161
    def test_diff_unversioned(self):
163
162
        # Get an error when diffing a non-versioned file.
164
163
        # (Malone #3619)
403
402
        self.assertEndsWith(out, "\n@@ -0,0 +1 @@\n"
404
403
                                 "+baz\n\n")
405
404
 
 
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
 
406
415
 
407
416
class TestDiffOutput(DiffBase):
408
417