~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merge sftp-leaks into catch-them-all

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):
321
324
        output = self.run_bzr('diff --format=boo', retcode=1)
322
325
        self.assertTrue("BOO!" in output[0])
323
326
 
324
 
 
325
327
class TestCheckoutDiff(TestDiff):
326
328
 
327
329
    def make_example_branch(self):
400
402
        self.assertEndsWith(out, "\n@@ -0,0 +1 @@\n"
401
403
                                 "+baz\n\n")
402
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
 
403
415
 
404
416
class TestDiffOutput(DiffBase):
405
417