aboutsummaryrefslogtreecommitdiffstats
path: root/test-markdown.py
diff options
context:
space:
mode:
authorEric Abrahamsen <girzel@gmail.com>2009-01-28 13:44:39 -0500
committerWaylan Limberg <waylan@gmail.com>2009-01-28 13:52:44 -0500
commitc89c1263798eaedffa09077819e769b019801556 (patch)
treeed9023a9338a04a115c13aab41add006a09fd36b /test-markdown.py
parent94c7c29f4e766032520ffac8a080c3bdba6c4da4 (diff)
downloadmarkdown-c89c1263798eaedffa09077819e769b019801556.tar.gz
markdown-c89c1263798eaedffa09077819e769b019801556.tar.bz2
markdown-c89c1263798eaedffa09077819e769b019801556.zip
Added optional HTML 4 output. Available formats currently include XHTML 1 and HTML 4.
Thanks to Eric Abrahamsen for doing the legwork and providing an initial working patch. And thanks to Fredrik Lundh for allowing us to include his html4 serializer from the ElementTree 1.3 preview.
Diffstat (limited to 'test-markdown.py')
-rwxr-xr-xtest-markdown.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test-markdown.py b/test-markdown.py
index f3be36e..95914c4 100755
--- a/test-markdown.py
+++ b/test-markdown.py
@@ -160,7 +160,7 @@ class TestRunner :
if not os.path.exists(TMP_DIR):
os.mkdir(TMP_DIR)
- def test_directory(self, dir, measure_time=False, safe_mode=False, encoding = "utf8") :
+ def test_directory(self, dir, measure_time=False, safe_mode=False, encoding="utf8", output_format='xhtml1') :
self.encoding = encoding
benchmark_file_name = os.path.join(dir, "benchmark.dat")
self.saved_benchmarks = {}
@@ -187,7 +187,7 @@ class TestRunner :
mem = memory()
start = time.clock()
- self.md = markdown.Markdown(extensions=extensions, safe_mode = safe_mode)
+ self.md = markdown.Markdown(extensions=extensions, safe_mode = safe_mode, output_format=output_format)
construction_time = time.clock() - start
construction_mem = memory(mem)
@@ -228,7 +228,7 @@ class TestRunner :
####################
- def run_test(self, dir, test, repeat) :
+ def run_test(self, dir, test, repeat):
print "--- %s ---" % test
self.html_diff_file.write("<tr><td>%s</td>" % test)
@@ -324,6 +324,7 @@ def run_tests() :
tester.test_directory("tests/extensions-x-toc")
tester.test_directory("tests/extensions-x-def_list")
tester.test_directory("tests/extensions-x-abbr")
+ tester.test_directory("tests/html4", output_format='html4')
try:
import pygments