~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bundle.py

  • Committer: Vincent Ladeuil
  • Date: 2008-09-11 10:53:31 UTC
  • mto: (3703.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 3704.
  • Revision ID: v.ladeuil+lp@free.fr-20080911105331-eoyl4qrfpu2v0pj4
Fixed as per jam's review.

* bzrlib/tests/test_bundle.py:
(BundleTester.test_unicode_bundle): Use an unicode file name, but
not an ambiguous one.

Show diffs side-by-side

added added

removed removed

Lines of Context:
795
795
        # Handle international characters
796
796
        os.mkdir('b1')
797
797
        try:
798
 
            f = open(u'b1/foo', 'wb')
 
798
            f = open(u'b1/with Dod\N{Euro Sign}', 'wb')
799
799
        except UnicodeEncodeError:
800
800
            raise TestSkipped("Filesystem doesn't support unicode")
801
801
 
807
807
            u'William Dod\xe9\n').encode('utf-8'))
808
808
        f.close()
809
809
 
810
 
        self.tree1.add([u'foo'], ['withdod-id'])
 
810
        self.tree1.add([u'with Dod\N{Euro Sign}'], ['withdod-id'])
811
811
        self.tree1.commit(u'i18n commit from William Dod\xe9',
812
812
                          rev_id='i18n-1', committer=u'William Dod\xe9')
813
813
 
815
815
        bundle = self.get_valid_bundle('null:', 'i18n-1')
816
816
 
817
817
        # Modified
818
 
        f = open(u'b1/foo', 'wb')
 
818
        f = open(u'b1/with Dod\N{Euro Sign}', 'wb')
819
819
        f.write(u'Modified \xb5\n'.encode('utf8'))
820
820
        f.close()
821
821
        self.tree1.commit(u'modified', rev_id='i18n-2')
823
823
        bundle = self.get_valid_bundle('i18n-1', 'i18n-2')
824
824
 
825
825
        # Renamed
826
 
        self.tree1.rename_one(u'foo', u'bar')
 
826
        self.tree1.rename_one(u'with Dod\N{Euro Sign}', u'B\N{Euro Sign}gfors')
827
827
        self.tree1.commit(u'renamed, the new i18n man', rev_id='i18n-3',
828
828
                          committer=u'Erik B\xe5gfors')
829
829
 
830
830
        bundle = self.get_valid_bundle('i18n-2', 'i18n-3')
831
831
 
832
832
        # Removed
833
 
        self.tree1.remove([u'bar'])
 
833
        self.tree1.remove([u'B\N{Euro Sign}gfors'])
834
834
        self.tree1.commit(u'removed', rev_id='i18n-4')
835
835
 
836
836
        bundle = self.get_valid_bundle('i18n-3', 'i18n-4')