diff --git a/doorstop/cli/tests/test_all.py b/doorstop/cli/tests/test_all.py index e2059da1..79f7979e 100644 --- a/doorstop/cli/tests/test_all.py +++ b/doorstop/cli/tests/test_all.py @@ -822,6 +822,15 @@ def test_publish_tree_markdown_with_index(self): self.assertTrue(os.path.isdir(path)) self.assertTrue(os.path.isfile(os.path.join(path, "index.md"))) + def test_publish_tree_markdown_with_index_no_tree(self): + """Verify 'doorstop publish' can create Markdown output for a tree, + with an index.""" + path = tempfile.mkdtemp() + os.remove(path) + self.assertRaises( + SystemExit, main(["publish", "all", path, "--markdown", "--index"]) + ) + class TestPublishCommand(TempTestCase): """Tests 'doorstop publish' options toc and template"""