From 0bb6df24ccfcbccb4d9d81f9fd3c1efb94d5ae8a Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 27 Sep 2014 17:24:12 +0100 Subject: Generate sub and sup elements for subscript and superscript text --- tests/conversion_tests.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'tests') 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("Hello", 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("Hello", 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("Hello", result.value) + @istest def runs_are_converted_by_satisfying_matching_paths(): -- cgit v1.2.3