/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 bzrlib/tests/test_diff.py

  • Committer: Gordon Tyler
  • Date: 2010-01-02 01:11:03 UTC
  • mto: (5037.3.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5046.
  • Revision ID: gordon@doxxx.net-20100102011103-tz68m2h9natsnma7
Added test_from_string_path_with_backslashes, which tests the actual scenario in bug 392428.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1303
1303
                         diff_obj.command_template)
1304
1304
        self.assertEqual(['diff', '-u 5', 'old-path', 'new-path'],
1305
1305
                         diff_obj._get_command('old-path', 'new-path'))
 
1306
        
 
1307
    def test_from_string_path_with_backslashes(self):
 
1308
        if sys.platform != 'win32':
 
1309
            raise TestSkipped('only win32 has paths with backslashes')
 
1310
        tool = 'C:\\Tools\\Diff.exe'
 
1311
        diff_obj = DiffFromTool.from_string(tool, None, None, None)
 
1312
        self.addCleanup(diff_obj.finish)
 
1313
        self.assertEqual(['C:\\Tools\\Diff.exe', '@old_path', '@new_path'],
 
1314
                         diff_obj.command_template)
 
1315
        self.assertEqual(['C:\\Tools\\Diff.exe', 'old-path', 'new-path'],
 
1316
                         diff_obj._get_command('old-path', 'new-path'))
1306
1317
 
1307
1318
    def test_execute(self):
1308
1319
        output = StringIO()