diff options
| author | Michael Williamson <mike@zwobble.org> | 2014-03-19 22:23:46 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2014-03-19 22:23:46 +0000 |
| commit | a42f09074571627e2c6430515c8a0d65a7778afe (patch) | |
| tree | 7bb1a4d72e5244ceeafb9f2f0483aa6f845d9cbb /tests/cli_tests.py | |
| parent | 04cae35fcaaffa42fea663865b6cb11c117d423b (diff) | |
Add test for using style map with CLI
Diffstat (limited to 'tests/cli_tests.py')
| -rw-r--r-- | tests/cli_tests.py | 11 |
1 files changed, 11 insertions, 0 deletions
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"<span>Walking on imported air</span>", result.output) |
