~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/workingtree_implementations/test_parents.py

  • Committer: Johan Walles
  • Date: 2009-05-06 05:36:28 UTC
  • mfrom: (4332 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4343.
  • Revision ID: johan.walles@gmail.com-20090506053628-tbf1wz4a0m9t684g
MergeĀ fromĀ upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
237
237
        # The link points to a file whose name is an omega
238
238
        # U+03A9 GREEK CAPITAL LETTER OMEGA
239
239
        # UTF-8: ce a9  UTF-16BE: 03a9  Decimal: Ω
240
 
        os.symlink(u'\u03a9','tree1/link_name')
241
 
        tree.add(['link_name'],['link-id'])
 
240
        target = u'\u03a9'
 
241
        link_name = u'\N{Euro Sign}link'
 
242
        os.symlink(target, 'tree1/' + link_name)
 
243
        tree.add([link_name],['link-id'])
242
244
 
243
245
        revision1 = tree.commit('added a link to a Unicode target')
244
246
        revision2 = tree.commit('this revision will be discarded')
245
247
        tree.set_parent_ids([revision1])
 
248
        tree.lock_read()
 
249
        self.addCleanup(tree.unlock)
 
250
        # Check that the symlink target is safely round-tripped in the trees.
 
251
        self.assertEqual(target, tree.get_symlink_target('link-id'))
 
252
        basis = tree.basis_tree()
 
253
        self.assertEqual(target, basis.get_symlink_target('link-id'))
246
254
 
247
255
 
248
256
class TestAddParent(TestParents):