1
# Copyright (C) 2007 David Allouche <ddaa@ddaa.net>
 
 
3
# This program is free software; you can redistribute it and/or modify
 
 
4
# it under the terms of the GNU General Public License as published by
 
 
5
# the Free Software Foundation; either version 2 of the License, or
 
 
6
# (at your option) any later version.
 
 
8
# This program is distributed in the hope that it will be useful,
 
 
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
 
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
 
11
# GNU General Public License for more details.
 
 
13
# You should have received a copy of the GNU General Public License
 
 
14
# along with this program; if not, write to the Free Software
 
 
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 
17
"""Black-box tests for bzr-git."""
 
 
19
from bzrlib.tests.blackbox import ExternalBase
 
 
21
from bzrlib.plugins.git import (
 
 
27
class TestGitBlackBox(ExternalBase):
 
 
30
        # Smoke test for "bzr log" in a git repository.
 
 
32
        # Create a git repository with a revision.
 
 
34
        builder = tests.GitBranchBuilder()
 
 
35
        builder.set_file('a', 'text for a\n', False)
 
 
36
        builder.commit('Joe Foo <joe@foo.com>', u'<The commit message>')
 
 
39
        # Check that bzr log does not fail and includes the revision.
 
 
40
        output, error = self.run_bzr(['log'])
 
 
41
        self.assertEqual(error, '')
 
 
43
            '<The commit message>' in output,
 
 
44
            "Commit message was not found in output:\n%s" % (output,))