aboutsummaryrefslogtreecommitdiff
path: root/tests/styles/parser
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-11-29 21:51:15 +0000
committerMichael Williamson <mike@zwobble.org>2016-11-29 21:51:15 +0000
commit406325d3cad205eb010f8936d50337fcb61193d1 (patch)
tree8c86178519200975a7053f477b64fc27b0e129a8 /tests/styles/parser
parentf6e7dac51adf4283c60df7ddc1500dd5e3215852 (diff)
Add parsing for style name prefixes
Diffstat (limited to 'tests/styles/parser')
-rw-r--r--tests/styles/parser/document_matcher_parser_tests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/styles/parser/document_matcher_parser_tests.py b/tests/styles/parser/document_matcher_parser_tests.py
index bec2368..0cf5f0e 100644
--- a/tests/styles/parser/document_matcher_parser_tests.py
+++ b/tests/styles/parser/document_matcher_parser_tests.py
@@ -39,6 +39,14 @@ def reads_paragraph_with_exact_style_name():
@istest
+def reads_paragraph_with_style_name_prefix():
+ assert_equal(
+ document_matchers.paragraph(style_name=document_matchers.starts_with("Heading")),
+ read_document_matcher("p[style-name^='Heading']")
+ )
+
+
+@istest
def reads_paragraph_ordered_list():
assert_equal(
document_matchers.paragraph(numbering=documents.numbering_level(1, is_ordered=True)),