/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 tests/test_blackbox.py

Add check-all target.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
    )
28
28
 
29
29
from bzrlib.tests.blackbox import ExternalBase
 
30
from bzrlib.tests import KnownFailure
30
31
 
31
32
from bzrlib.plugins.git import (
32
33
    tests,
69
70
        output, error = self.run_bzr(['branch', 'gitbranch', 'bzrbranch'])
70
71
        self.assertEqual(error, 'Branched 1 revision(s).\n')
71
72
 
 
73
    def test_checkout(self):
 
74
        os.mkdir("gitbranch")
 
75
        GitRepo.init(os.path.join(self.test_dir, "gitbranch"))
 
76
        os.chdir('gitbranch')
 
77
        builder = tests.GitBranchBuilder()
 
78
        builder.set_file('a', 'text for a\n', False)
 
79
        builder.commit('Joe Foo <joe@foo.com>', u'<The commit message>')
 
80
        builder.finish()
 
81
        os.chdir('..')
 
82
 
 
83
        output, error = self.run_bzr(['checkout', 'gitbranch', 'bzrbranch'])
 
84
        self.assertEqual(error, '')
 
85
        self.assertEqual(output, '')
 
86
 
72
87
    def test_branch_ls(self):
73
88
        self.simple_commit()
74
89
        output, error = self.run_bzr(['ls', '-r-1'])
76
91
        self.assertEqual(output, "a\n")
77
92
 
78
93
    def test_init(self):
79
 
        self.run_bzr("init-repo --git repo") 
 
94
        self.run_bzr("init --git repo") 
80
95
 
81
96
    def test_info_verbose(self):
82
97
        self.simple_commit()
93
108
        GitRepo.init(os.path.join(self.test_dir, "bla"))
94
109
        self.run_bzr(['init', 'foo'])
95
110
        self.run_bzr(['commit', '--unchanged', '-m', 'bla', 'foo'])
 
111
        output, error = self.run_bzr(['push', '-d', 'foo', 'bla'], retcode=3)
 
112
        raise KnownFailure("roundtripping is not supported")
 
113
 
 
114
        # when roundtripping is supported
96
115
        output, error = self.run_bzr(['push', '-d', 'foo', 'bla'])
97
116
        self.assertEquals("", output)
98
117
        self.assertTrue(error.endswith("Created new branch.\n"))
128
147
 
129
148
        output, error = self.run_bzr(["tag", "bar"])
130
149
 
131
 
        self.assertEquals(error, '')
132
 
        self.assertEquals(output, 'Created tag bar.\n')
 
150
        # bzr <= 2.2 emits this message in the output stream
 
151
        # bzr => 2.3 emits this message in the error stream
 
152
        self.assertEquals(error + output, 'Created tag bar.\n')
133
153
 
134
154
    def test_init_repo(self):
135
 
        output, error = self.run_bzr(["init-repo", "--git", "bla.git"])
 
155
        output, error = self.run_bzr(["init", "--git", "bla.git"])
136
156
        self.assertEquals(error, '')
137
 
        self.assertEquals(output, 'Unshared repository with trees (format: git)\nLocation:\n  repository: bla.git\n')
 
157
        self.assertEquals(output, 'Created a standalone tree (format: git)\n')
138
158