~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_branches.py

(jelmer) Make "bzr branches" support our shared-repo style of "sibling
 branches" too. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
"""Black-box tests for bzr branches."""
19
19
 
 
20
from bzrlib.bzrdir import BzrDir
20
21
from bzrlib.tests import TestCaseWithTransport
21
22
 
22
23
 
76
77
        out, err = self.run_bzr('branches a')
77
78
        self.assertEquals(out, "  another\n"
78
79
                               "* colocated\n")
 
80
 
 
81
    def test_shared_repos(self):
 
82
        self.make_repository('a', shared=True)
 
83
        BzrDir.create_branch_convenience('a/branch1')
 
84
        b = BzrDir.create_branch_convenience('a/branch2')
 
85
        b.create_checkout(lightweight=True, to_location='b')
 
86
        out, err = self.run_bzr('branches b')
 
87
        self.assertEquals(out, "  branch1\n"
 
88
                               "* branch2\n")
 
89
 
 
90
    def test_standalone_branch(self):
 
91
        self.make_branch('a')
 
92
        out, err = self.run_bzr('branches a')
 
93
        self.assertEquals(out, "* (default)\n")