aboutsummaryrefslogtreecommitdiff
path: root/tests/styles/parser/document_matcher_parser_tests.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-11-29 21:54:31 +0000
committerMichael Williamson <mike@zwobble.org>2016-11-29 21:54:31 +0000
commit5bc676b074a651a70b3b259182a94120c036d74a (patch)
tree5a7a46be69566f3472c4ca841983b7d6c6d60b4f /tests/styles/parser/document_matcher_parser_tests.py
parent95394c062b971179a7fda954771bdb6390ba88b7 (diff)
Raise error on unrecognised string matcher
Diffstat (limited to 'tests/styles/parser/document_matcher_parser_tests.py')
-rw-r--r--tests/styles/parser/document_matcher_parser_tests.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/styles/parser/document_matcher_parser_tests.py b/tests/styles/parser/document_matcher_parser_tests.py
index 0cf5f0e..194d6fa 100644
--- a/tests/styles/parser/document_matcher_parser_tests.py
+++ b/tests/styles/parser/document_matcher_parser_tests.py
@@ -47,6 +47,12 @@ def reads_paragraph_with_style_name_prefix():
@istest
+def unrecognised_string_matcher_raises_error():
+ error = assert_raises(LineParseError, lambda: read_document_matcher("p[style-name*='Heading']"))
+ assert_equal("Unrecognised string matcher: *", str(error))
+
+
+@istest
def reads_paragraph_ordered_list():
assert_equal(
document_matchers.paragraph(numbering=documents.numbering_level(1, is_ordered=True)),