Rev 5227: Fix fallouts from the top node addition. in file:///home/vila/src/bzr/bugs/219334-texinfo/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Fri Jul 9 11:29:10 BST 2010
At file:///home/vila/src/bzr/bugs/219334-texinfo/
------------------------------------------------------------
revno: 5227
revision-id: v.ladeuil+lp at free.fr-20100709102910-h32zqqfpjtk889ma
parent: v.ladeuil+lp at free.fr-20100709100729-8pzsusdw5ae9lkkj
fixes bug(s): https://launchpad.net/bugs/219334
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: texinfo
timestamp: Fri 2010-07-09 12:29:10 +0200
message:
Fix fallouts from the top node addition.
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS 2010-07-05 12:40:28 +0000
+++ b/NEWS 2010-07-09 10:29:10 +0000
@@ -425,6 +425,10 @@
to make the tests conditional.
(Vincent Ladeuil)
+* Added a builder/writer sphinx extension that can generate texinfo files. The
+ generated files are syntactically correct but the info navigation nodes
+ needs more work. (Vincent Ladeuil)
+
API Changes
***********
=== modified file 'bzrlib/tests/doc_generate/__init__.py'
--- a/bzrlib/tests/doc_generate/__init__.py 2010-07-06 13:22:32 +0000
+++ b/bzrlib/tests/doc_generate/__init__.py 2010-07-09 10:29:10 +0000
@@ -83,17 +83,20 @@
self.build_tree_contents([('index.txt', content),])
self.build(app)
- def assertContent(self, expected, end=None):
+ def assertContent(self, expected, header=None, end=None):
"""Check the content of the file created with creste_content().
Most texinfo constructs can be tested this way without caring for any
boilerplate that texinfo may require at the beginning or the end of the
file.
"""
+ if header is None:
+ # default boilerplate
+ header = '@node Top\n at top Placeholder\n'
if end is None:
# By default we test constructs that are embedded into a paragraph
# which always end with two \n (even if the input has none)
end = '\n\n'
- self.assertFileEqual(expected + end, 'index.texi')
+ self.assertFileEqual(header + expected + end, 'index.texi')
=== modified file 'bzrlib/tests/doc_generate/writers/test_texinfo.py'
--- a/bzrlib/tests/doc_generate/writers/test_texinfo.py 2010-07-09 08:25:20 +0000
+++ b/bzrlib/tests/doc_generate/writers/test_texinfo.py 2010-07-09 10:29:10 +0000
@@ -97,7 +97,11 @@
Bazaar Release Notes
####################
''')
- self.assertContent('@chapter Bazaar Release Notes\n', end='')
+ self.assertContent('''\
+ at node bazaar-release-notes
+ at chapter Bazaar Release Notes
+''',
+ end='')
class TestListGeneration(test_dg.TestSphinx):
@@ -197,6 +201,9 @@
app, out, err = self.make_sphinx()
self.build(app)
self.assertFileEqual("""\
+ at node Top
+ at top Placeholder
+ at node table-of-contents
@chapter Table of Contents
@menu
* bzr 0.0.8: (bzr-0.0.8.info)bzr 0.0.8.
@@ -204,7 +211,11 @@
""",
'index.texi')
self.assertFileEqual("""\
+ at node Top
+ at top Placeholder
+ at node bzr-0-0-8
@chapter bzr 0.0.8
+ at node improvements
@section Improvements
@itemize @bullet
@item
@@ -258,24 +269,31 @@
No idea how to call that, but sphinx says it's a paragraph.
''')
self.assertContent('''\
+ at node chapter-one
@chapter Chapter one
Chapter introduction.
+ at node section-one
@section section one
The first section.
+ at node subsection-one
@subsection subsection one
The first subsection.
+ at node subsection-two
@subsection subsection two
The second subsection.
+ at node subsubsection-one
@subsubsection subsubsection one
Here is sus sub section one.
+ at node blob-one
@heading blob one
Far tooo deep to get a name
+ at node thing-one
@heading thing one
No idea how to call that, but sphinx says it's a paragraph.''')
More information about the bazaar-commits
mailing list