~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

(robertc) Fix lp: urls behind an https proxy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2011 Canonical Ltd
 
1
# Copyright (C) 2006-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
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):
323
320
        self.build_tree_contents([('hello', 'hello world!\n')])
324
321
        output = self.run_bzr('diff --format=boo', retcode=1)
325
322
        self.assertTrue("BOO!" in output[0])
326
 
        output = self.run_bzr('diff -Fboo', retcode=1)
327
 
        self.assertTrue("BOO!" in output[0])
328
323
 
329
324
 
330
325
class TestCheckoutDiff(TestDiff):
389
384
        # subprocess.py that we had to workaround).
390
385
        # However, if 'diff' may not be available
391
386
        self.make_example_branch()
392
 
        self.overrideEnv('BZR_PROGRESS_BAR', 'none')
 
387
        # this will be automatically restored by the base bzr test class
 
388
        os.environ['BZR_PROGRESS_BAR'] = 'none'
393
389
        out, err = self.run_bzr_subprocess('diff -r 1 --diff-options -ub',
394
390
                                           universal_newlines=True,
395
391
                                           retcode=None)
404
400
        self.assertEndsWith(out, "\n@@ -0,0 +1 @@\n"
405
401
                                 "+baz\n\n")
406
402
 
407
 
    def test_external_diff_options_and_using(self):
408
 
        """Test that the options are passed correctly to an external diff process"""
409
 
        self.requireFeature(features.diff_feature)
410
 
        self.make_example_branch()
411
 
        self.build_tree_contents([('hello', 'Foo\n')])
412
 
        out, err = self.run_bzr('diff --diff-options -i --using diff',
413
 
                                    retcode=1)
414
 
        self.assertEquals("=== modified file 'hello'\n", out)
415
 
        self.assertEquals('', err)
416
 
 
417
403
 
418
404
class TestDiffOutput(DiffBase):
419
405