From f5595b78f59d3f3a04c4e83702114dc2704f808a Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 14 Dec 2013 17:25:23 +0000 Subject: Match document matchers with numbering correctly --- tests/conversion_tests.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'tests/conversion_tests.py') diff --git a/tests/conversion_tests.py b/tests/conversion_tests.py index 4732991..c0fab30 100644 --- a/tests/conversion_tests.py +++ b/tests/conversion_tests.py @@ -74,6 +74,32 @@ def no_warning_if_there_is_no_style_for_plain_paragraphs(): documents.paragraph(children=[_run_with_text("Tip")]), ) assert_equal([], result.messages) + + +@istest +def bulleted_paragraphs_are_converted_using_matching_styles(): + result = convert_document_element_to_html( + documents.paragraph(children=[ + _run_with_text("Hello") + ], numbering=documents.numbering_level(level_index=1, is_ordered=False)), + styles=[ + style_reader.read_style("p:unordered-list(1) => ul > li:fresh") + ] + ) + assert_equal('', result.value) + + +@istest +def bulleted_styles_dont_match_plain_paragraph(): + result = convert_document_element_to_html( + documents.paragraph(children=[ + _run_with_text("Hello") + ]), + styles=[ + style_reader.read_style("p:unordered-list(1) => ul > li:fresh") + ] + ) + assert_equal('

Hello

', result.value) @istest -- cgit v1.2.3