diff options
author | JensDiemer <git@jensdiemer.de> | 2011-10-05 10:14:46 +0200 |
---|---|---|
committer | JensDiemer <git@jensdiemer.de> | 2011-10-05 10:14:46 +0200 |
commit | 842e60cc3ed935c7f8bd9f79bed509221805cccf (patch) | |
tree | 111d0cd3939bc39750156426c03d65313197e9f6 /creole/tests/test_cross_compare_textile.py | |
parent | 13f060f48e30dc903cd6fdf5c33c63a1396fdade (diff) | |
download | creole-842e60cc3ed935c7f8bd9f79bed509221805cccf.tar.gz |
move unittests
Diffstat (limited to 'creole/tests/test_cross_compare_textile.py')
-rw-r--r-- | creole/tests/test_cross_compare_textile.py | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/creole/tests/test_cross_compare_textile.py b/creole/tests/test_cross_compare_textile.py new file mode 100644 index 0000000..2d8ca96 --- /dev/null +++ b/creole/tests/test_cross_compare_textile.py @@ -0,0 +1,72 @@ +#!/usr/bin/env python +# coding: utf-8 + +""" + cross compare textile unittest + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Compare all similarities between: + * textile2html (used the python textile module) + * html2textile + + Note: This only works fine if there is no problematic whitespace handling. + In this case, we must test in test_creole2html.py or test_html2creole.py + + :copyleft: 2008-2011 by python-creole team, see AUTHORS for more details. + :license: GNU GPL v3 or above, see LICENSE for more details. +""" + +from __future__ import division, absolute_import, print_function, unicode_literals + +import unittest + +from creole.tests.utils.base_unittest import BaseCreoleTest + + +class CrossCompareTextileTests(BaseCreoleTest): + def test_typeface_basic(self): + self.cross_compare_textile( + textile_string=""" + _emphasis_ + *strong* + __italic__ + **bold** + ??citation?? + -deleted text- + +inserted text+ + ^superscript^ + ~subscript~ + %span% + @code@ + """, + html_string=""" + <p><em>emphasis</em><br /> + <strong>strong</strong><br /> + <i>italic</i><br /> + <b>bold</b><br /> + <cite>citation</cite><br /> + <del>deleted text</del><br /> + <ins>inserted text</ins><br /> + <sup>superscript</sup><br /> + <sub>subscript</sub><br /> + <span>span</span><br /> + <code>code</code></p> + """ + ) + + def test_escape_in_pre(self): + self.cross_compare_textile( + textile_string=""" + <pre> + <html escaped> + </pre> + """, + html_string=""" + <pre> + <html escaped> + </pre> + """) + + +if __name__ == '__main__': + unittest.main() |