From 5bc676b074a651a70b3b259182a94120c036d74a Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Tue, 29 Nov 2016 21:54:31 +0000 Subject: Raise error on unrecognised string matcher --- tests/styles/parser/document_matcher_parser_tests.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') 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 @@ -46,6 +46,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( -- cgit v1.2.3