/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/test_diff.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2019-12-23 03:21:37 UTC
  • mfrom: (7290.1.45 diff-using-fix)
  • Revision ID: breezy.the.bot@gmail.com-20191223032137-m60b7q9g22ow423i
Fix 'bzr diff --using' when no variables are specified in the template.

Merged from https://code.launchpad.net/~jelmer/brz/diff-using-fix/+merge/377088

Show diffs side-by-side

added added

removed removed

Lines of Context:
875
875
        self.assertEqual(['diff', '{old_path}', '{new_path}'],
876
876
                         diff_obj.command_template)
877
877
 
 
878
    def test_from_string_no_paths(self):
 
879
        diff_obj = diff.DiffFromTool.from_string(
 
880
            ['diff', "-u5"], None, None, None)
 
881
        self.addCleanup(diff_obj.finish)
 
882
        self.assertEqual(['diff', '-u5'],
 
883
                         diff_obj.command_template)
 
884
        self.assertEqual(['diff', '-u5', 'old-path', 'new-path'],
 
885
                         diff_obj._get_command('old-path', 'new-path'))
 
886
 
878
887
    def test_from_string_u5(self):
879
888
        diff_obj = diff.DiffFromTool.from_string(
880
889
            ['diff', "-u 5", '{old_path}', '{new_path}'], None, None, None)