From a42f09074571627e2c6430515c8a0d65a7778afe Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 19 Mar 2014 22:23:46 +0000 Subject: Add test for using style map with CLI --- tests/cli_tests.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests') diff --git a/tests/cli_tests.py b/tests/cli_tests.py index c8f8ac9..f76df45 100644 --- a/tests/cli_tests.py +++ b/tests/cli_tests.py @@ -55,3 +55,14 @@ def images_are_written_to_separate_files_if_output_dir_is_set(): with open(image_path, "rb") as image_file: assert_equal(_image_base_64, base64.b64encode(image_file.read())) + +@istest +def style_map_is_used_if_set(): + with tempman.create_temp_dir() as temp_dir: + docx_path = test_path("single-paragraph.docx") + style_map_path = os.path.join(temp_dir.path, "style-map") + with open(style_map_path, "w") as style_map_file: + style_map_file.write("p => span:fresh") + result = _local.run(["mammoth", docx_path, "--style-map", style_map_path]) + assert_equal(b"", result.stderr_output) + assert_equal(b"Walking on imported air", result.output) -- cgit v1.2.3