1
# Copyright (C) 2010, 2011 Canonical Ltd
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
"""sphinx texinfo builder tests."""
19
from bzrlib import tests
20
from bzrlib.doc_generate import (
21
# FIXME: doc/en/conf.py should be used here, or rather merged into
22
# bzrlib/doc_generate/conf.py -- vila 20100429
25
from bzrlib.tests import (
26
doc_generate as test_dg, # Avoid clash with from bzrlib import doc_generate
30
class TestBuilderDefined(tests.TestCase):
32
def test_builder_defined(self):
33
self.assertTrue('bzrlib.doc_generate.builders.texinfo'
36
class TestBuilderLoaded(test_dg.TestSphinx):
38
def test_builder_loaded(self):
39
app, out, err = self.make_sphinx()
40
self.assertTrue('texinfo' in app.builderclasses)
43
class TestFileProduction(test_dg.TestSphinx):
45
def test_files_generated(self):
46
self.build_tree_contents(
64
* Adding a file whose parent directory is not versioned will
65
implicitly add the parent, and so on up to the root.
68
app, out, err = self.make_sphinx()
70
self.assertPathExists('index.texi')
71
self.assertPathExists('content.texi')