aboutsummaryrefslogtreecommitdiffstats
path: root/test-markdown.py
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2009-08-23 14:42:52 -0400
committerWaylan Limberg <waylan@gmail.com>2009-08-23 14:42:52 -0400
commitb688bf59dee2ed1552c0b232a43066ba18393ab0 (patch)
treeb5c8bc09beee2ad2b2cfe28d53f6422c7907f9cb /test-markdown.py
parentb4ce140d4e0e9839eb8e95f26165b8584441a5f2 (diff)
downloadmarkdown-b688bf59dee2ed1552c0b232a43066ba18393ab0.tar.gz
markdown-b688bf59dee2ed1552c0b232a43066ba18393ab0.tar.bz2
markdown-b688bf59dee2ed1552c0b232a43066ba18393ab0.zip
Fixed Ticket 43. Apparenlty ElementTree does not recognize 'utf8' as an alias of 'utf-8' and outputs invalid xml. We never noticed as stripTopLevelTags removes the offending fragment. However, there are legitimate uses for turning off stripTopLevelTags. Therefore, from now on we will be using 'utf-8' internally. Thanks to Mark Eichin for the report.
Diffstat (limited to 'test-markdown.py')
-rwxr-xr-xtest-markdown.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test-markdown.py b/test-markdown.py
index 95914c4..e5dd870 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", output_format='xhtml1') :
+ def test_directory(self, dir, measure_time=False, safe_mode=False, encoding="utf-8", output_format='xhtml1') :
self.encoding = encoding
benchmark_file_name = os.path.join(dir, "benchmark.dat")
self.saved_benchmarks = {}
@@ -209,7 +209,7 @@ class TestRunner :
self.html_diff_file.write("</table>")
if sys.version < "3.0":
- self.html_diff_file.write(self.diffs_buffer.decode("utf8"))
+ self.html_diff_file.write(self.diffs_buffer.decode("utf-8"))
self.html_diff_file.write(FOOTER)
self.html_diff_file.close()
@@ -249,8 +249,8 @@ class TestRunner :
conversion_mem = memory(mem)
self.md.reset()
- expected_lines = [x.encode("utf8") for x in smart_split(expected_output)]
- actual_lines = [x.encode("utf8") for x in smart_split(actual_output)]
+ expected_lines = [x.encode("utf-8") for x in smart_split(expected_output)]
+ actual_lines = [x.encode("utf-8") for x in smart_split(actual_output)]
#diff = difflib.ndiff(expected_output.split("\n"),
# actual_output.split("\n"))