aboutsummaryrefslogtreecommitdiff
path: root/tests/conversion_tests.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2017-07-21 12:19:15 +0100
committerMichael Williamson <mike@zwobble.org>2017-07-21 12:19:15 +0100
commit500a2aca545c47b9677bd85e55b9b24dc4ec9c7c (patch)
tree61a7bb91ae91ffd498b5ad1c2e5aac4178f72bb3 /tests/conversion_tests.py
parent6f7fbaa001eda6aca41f9a4f54f526ef7b87b738 (diff)
Add style mapping for small caps
Diffstat (limited to 'tests/conversion_tests.py')
-rw-r--r--tests/conversion_tests.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/conversion_tests.py b/tests/conversion_tests.py
index 77b0a30..38aa1a8 100644
--- a/tests/conversion_tests.py
+++ b/tests/conversion_tests.py
@@ -228,6 +228,25 @@ def strikethrough_runs_can_be_configured_with_style_mapping():
]
)
assert_equal("<del>Hello</del>", result.value)
+
+
+@istest
+def small_caps_runs_are_ignored_by_default():
+ result = convert_document_element_to_html(
+ documents.run(children=[documents.text("Hello")], is_small_caps=True),
+ )
+ assert_equal("Hello", result.value)
+
+
+@istest
+def small_caps_runs_can_be_mapped_using_style_mapping():
+ result = convert_document_element_to_html(
+ documents.run(children=[documents.text("Hello")], is_small_caps=True),
+ style_map=[
+ _style_mapping("small-caps => span")
+ ]
+ )
+ assert_equal("<span>Hello</span>", result.value)
@istest