At file:///home/vila/src/bzr/bugs/219334-texinfo/
------------------------------------------------------------
revno: 5227
revision-id: [email protected]
parent: [email protected]
committer: Vincent Ladeuil <[email protected]>
branch nick: texinfo
timestamp: Fri 2010-07-09 12:19:52 +0200
message:
Fix fallouts from the top node addition.
=== modified file 'NEWS'
--- a/NEWS 2010-07-05 12:40:28 +0000
+++ b/NEWS 2010-07-09 10:19:52 +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:19:52 +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 to...@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:19:52
+0000
@@ -97,7 +97,11 @@
Bazaar Release Notes
####################
''')
- self.assertContent('@chapter Bazaar Release Notes\n', end='')
+ self.assertContent('''\
+...@node bazaar-release-notes
+...@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("""\
+...@node Top
+...@top Placeholder
+...@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("""\
+...@node Top
+...@top Placeholder
+...@node bzr-0-0-8
@chapter bzr 0.0.8
+...@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('''\
+...@node chapter-one
@chapter Chapter one
Chapter introduction.
+...@node section-one
@section section one
The first section.
+...@node subsection-one
@subsection subsection one
The first subsection.
+...@node subsection-two
@subsection subsection two
The second subsection.
+...@node subsubsection-one
@subsubsection subsubsection one
Here is sus sub section one.
+...@node blob-one
@heading blob one
Far tooo deep to get a name
+...@node thing-one
@heading thing one
No idea how to call that, but sphinx says it's a paragraph.''')
--
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits