/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/blackbox/test_bound_branches.py

  • Committer: Martin von Gagern
  • Date: 2010-05-02 20:10:25 UTC
  • mto: This revision was merged to the branch mainline in revision 5203.
  • Revision ID: martin.vgagern@gmx.net-20100502201025-ssuldxi8i98desfh
Added blackbox tests for --directory option.

Added tests for the new --directory (-d) option to these commands: added,
annotate, bind, cat, clean-tree, deleted, export, ignore, ignored,
lookup-revision, ls, modified, nick, re-sign, unbind, unknowns.

Show diffs side-by-side

added added

removed removed

Lines of Context:
422
422
        self.check_revno(4)
423
423
        self.check_revno(4, '../base')
424
424
 
 
425
    def test_bind_directory(self):
 
426
        """Test --directory option"""
 
427
        tree = self.make_branch_and_tree('base')
 
428
        self.build_tree(['base/a', 'base/b'])
 
429
        tree.add('a', 'b')
 
430
        tree.commit(message='init')
 
431
        branch = tree.branch
 
432
        tree.bzrdir.sprout('child')
 
433
        self.run_bzr('bind --directory=child base')
 
434
        d = BzrDir.open('child')
 
435
        self.assertNotEqual(None, d.open_branch().get_master_branch())
 
436
        self.run_bzr('unbind -d child')
 
437
        self.assertEqual(None, d.open_branch().get_master_branch())
 
438
        self.run_bzr('unbind --directory child', retcode=3)
 
439
 
425
440
 
426
441
class TestBind(script.TestCaseWithTransportAndScript):
427
442