27
27
class TestGitBlackBox(ExternalBase):
29
def simple_commit(self):
30
# Create a git repository with a revision.
32
builder = tests.GitBranchBuilder()
33
builder.set_file('a', 'text for a\n', False)
34
builder.commit('Joe Foo <joe@foo.com>', u'<The commit message>')
29
37
def test_info(self):
30
# Create a git repository with a revision.
32
builder = tests.GitBranchBuilder()
33
builder.set_file('a', 'text for a\n', False)
34
builder.commit('Joe Foo <joe@foo.com>', u'<The commit message>')
37
39
output, error = self.run_bzr(['info'])
38
40
self.assertEqual(error, '')
39
41
self.assertTrue("Repository branch (format: git)" in output)
45
output, error = self.run_bzr(['ls'])
46
self.assertEqual(error, '')
47
self.assertEqual(output, "a\n")
49
def test_info_verbose(self):
52
output, error = self.run_bzr(['info', '-v'])
53
self.assertEqual(error, '')
54
self.assertTrue("Repository branch (format: git)" in output)
55
self.assertTrue("control: Local Git Repository" in output)
56
self.assertTrue("branch: Git Branch" in output)
57
self.assertTrue("repository: Git Repository" in output)
41
59
def test_log(self):
42
60
# Smoke test for "bzr log" in a git repository.
44
# Create a git repository with a revision.
46
builder = tests.GitBranchBuilder()
47
builder.set_file('a', 'text for a\n', False)
48
builder.commit('Joe Foo <joe@foo.com>', u'<The commit message>')
51
63
# Check that bzr log does not fail and includes the revision.
52
64
output, error = self.run_bzr(['log'])
55
67
'<The commit message>' in output,
56
68
"Commit message was not found in output:\n%s" % (output,))
70
def test_log_verbose(self):
71
# Smoke test for "bzr log -v" in a git repository.
74
# Check that bzr log does not fail and includes the revision.
75
output, error = self.run_bzr(['log', '-v'])