543
544
self.assertTreeLayout([('', root_id), ('a', 'a-id'), ('c', 'c-id'),
544
545
('a/b', 'b-id')], tree.basis_tree())
548
def test_move_to_unversioned_non_ascii_dir(self):
549
"""Check error when moving to unversioned non-ascii directory"""
550
self.requireFeature(tests.UnicodeFilename)
551
tree = self.make_branch_and_tree(".")
552
self.build_tree(["a", u"\xA7/"])
554
e = self.assertRaises(errors.BzrMoveFailedError,
555
tree.move, ["a"], u"\xA7")
556
self.assertIsInstance(e.extra, errors.NotVersionedError)
557
self.assertEqual(e.extra.path, u"\xA7")
559
def test_move_unversioned_non_ascii(self):
560
"""Check error when moving an unversioned non-ascii file"""
561
self.requireFeature(tests.UnicodeFilename)
562
tree = self.make_branch_and_tree(".")
563
self.build_tree([u"\xA7", "dir/"])
565
e = self.assertRaises(errors.BzrMoveFailedError,
566
tree.move, [u"\xA7"], "dir")
567
self.assertIsInstance(e.extra, errors.NotVersionedError)
568
self.assertEqual(e.extra.path, u"\xA7")