~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_diff.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-08-21 04:19:12 UTC
  • mfrom: (2711.2.7 remove-bzrdir-statics)
  • Revision ID: pqm@pqm.ubuntu.com-20070821041912-ph1kv921fvotcgdd
remove static BzrDir.create_repository

Show diffs side-by-side

added added

removed removed

Lines of Context:
498
498
        self.assertContainsRe(diff, r"--- a/%s" % (omega_utf8,))
499
499
        self.assertContainsRe(diff, r"\+\+\+ b/%s" % (omega_utf8,))
500
500
 
501
 
    def test_unicode_filename(self):
502
 
        """Test when the filename are unicode."""
503
 
        self.requireFeature(UnicodeFilename)
504
 
 
505
 
        alpha, omega = u'\u03b1', u'\u03c9'
506
 
        autf8, outf8 = alpha.encode('utf8'), omega.encode('utf8')
507
 
 
508
 
        tree = self.make_branch_and_tree('tree')
509
 
        self.build_tree_contents([('tree/ren_'+alpha, 'contents\n')])
510
 
        tree.add(['ren_'+alpha], ['file-id-2'])
511
 
        self.build_tree_contents([('tree/del_'+alpha, 'contents\n')])
512
 
        tree.add(['del_'+alpha], ['file-id-3'])
513
 
        self.build_tree_contents([('tree/mod_'+alpha, 'contents\n')])
514
 
        tree.add(['mod_'+alpha], ['file-id-4'])
515
 
 
516
 
        tree.commit('one', rev_id='rev-1')
517
 
 
518
 
        tree.rename_one('ren_'+alpha, 'ren_'+omega)
519
 
        tree.remove('del_'+alpha)
520
 
        self.build_tree_contents([('tree/add_'+alpha, 'contents\n')])
521
 
        tree.add(['add_'+alpha], ['file-id'])
522
 
        self.build_tree_contents([('tree/mod_'+alpha, 'contents_mod\n')])
523
 
 
524
 
        diff = self.get_diff(tree.basis_tree(), tree)
525
 
        self.assertContainsRe(diff,
526
 
                "=== renamed file 'ren_%s' => 'ren_%s'\n"%(autf8, outf8))
527
 
        self.assertContainsRe(diff, "=== added file 'add_%s'"%autf8)
528
 
        self.assertContainsRe(diff, "=== modified file 'mod_%s'"%autf8)
529
 
        self.assertContainsRe(diff, "=== removed file 'del_%s'"%autf8)
530
501
 
531
502
class TestPatienceDiffLib(TestCase):
532
503