aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2014-09-27 17:24:12 +0100
committerMichael Williamson <mike@zwobble.org>2014-09-27 17:24:12 +0100
commit0bb6df24ccfcbccb4d9d81f9fd3c1efb94d5ae8a (patch)
treecc8aa7a27c6aa1e718d7603341458ddb8f6d85a7 /tests
parent9fb300452f2e1734e531abde614b8513d0edd093 (diff)
Generate sub and sup elements for subscript and superscript text
Diffstat (limited to 'tests')
-rw-r--r--tests/conversion_tests.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/conversion_tests.py b/tests/conversion_tests.py
index d9dde3e..246671d 100644
--- a/tests/conversion_tests.py
+++ b/tests/conversion_tests.py
@@ -166,6 +166,28 @@ def underline_runs_can_be_wrapped_in_tags():
)
assert_equal("<u>Hello</u>", result.value)
+
+@istest
+def superscript_runs_are_wrapped_in_sup_tags():
+ result = convert_document_element_to_html(
+ documents.run(
+ children=[documents.text("Hello")],
+ vertical_alignment=documents.VerticalAlignment.superscript,
+ ),
+ )
+ assert_equal("<sup>Hello</sup>", result.value)
+
+
+@istest
+def subscript_runs_are_wrapped_in_sub_tags():
+ result = convert_document_element_to_html(
+ documents.run(
+ children=[documents.text("Hello")],
+ vertical_alignment=documents.VerticalAlignment.subscript,
+ ),
+ )
+ assert_equal("<sub>Hello</sub>", result.value)
+
@istest
def runs_are_converted_by_satisfying_matching_paths():