move test data to separate file

This commit is contained in:
Elan Ruusamäe 2012-06-19 23:42:08 +02:00
parent 9be54dc368
commit 5adb9db834
3 changed files with 10 additions and 8 deletions

View file

@ -10,13 +10,9 @@ from MoinMoin.request import RequestCLI
request = RequestCLI()
formatter = Formatter(request)
text = """
= Headers =
== Header 2 ==
=== Header 3 ===
==== Header 4 ====
===== Header 5 =====
"""
# pages/playground\(2f\)SyntaxReference/revisions/00000001
with open('syntaxreference.txt', 'r') as f:
text = f.read()
parser = Parser(text, request)

6
syntaxreference.txt Normal file
View file

@ -0,0 +1,6 @@
= Headers =
== Header 2 ==
=== Header 3 ===
==== Header 4 ====
===== Header 5 =====

View file

@ -142,7 +142,7 @@ class Formatter(FormatterBase):
return ['\n', '\\\n'][not preformatted]
def heading(self, on, depth, **kw):
# heading depth reversed in dokuwiki
# heading depth reversed in dokuwiki
heading_depth = 7 - depth
if on: