aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/conversion_tests.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/conversion_tests.py b/tests/conversion_tests.py
index 78fbce5..ced1d9e 100644
--- a/tests/conversion_tests.py
+++ b/tests/conversion_tests.py
@@ -201,7 +201,7 @@ def runs_are_converted_by_satisfying_matching_paths():
@istest
-def docx_hyperlink_is_converted_to_anchor_tag():
+def docx_hyperlink_with_href_is_converted_to_anchor_tag():
result = convert_document_element_to_html(
documents.hyperlink(href="http://example.com", children=[documents.Text("Hello")]),
)
@@ -209,6 +209,15 @@ def docx_hyperlink_is_converted_to_anchor_tag():
@istest
+def docx_hyperlink_with_internal_anchor_reference_is_converted_to_anchor_tag():
+ result = convert_document_element_to_html(
+ documents.hyperlink(anchor="start", children=[documents.Text("Hello")]),
+ id_prefix="doc-42",
+ )
+ assert_equal('<a href="#doc-42-start">Hello</a>', result.value)
+
+
+@istest
def docx_tab_is_converted_to_tab_in_html():
result = convert_document_element_to_html(documents.tab())
assert_equal('\t', result.value)