Skip to content

Commit

Permalink
Add test for prog_name option (#21)
Browse files Browse the repository at this point in the history
* Add test for prog_name option

* Format
  • Loading branch information
Florimond Manca authored Dec 9, 2020
1 parent 3e01e51 commit 2ef2082
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/test_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,26 @@ def test_extension():
assert md.convert(source) == md.convert(EXPECTED)


def test_prog_name():
"""
The :prog_name: attribute determines the name to display for the command.
"""
md = Markdown(extensions=[mkdocs_click.makeExtension()])

source = dedent(
"""
::: mkdocs-click
:module: tests.app.cli
:command: cli
:prog_name: custom
"""
)

expected = EXPECTED.replace("# cli", "# custom")

assert md.convert(source) == md.convert(expected)


def test_depth():
"""
The :depth: attribute increases the level of headers.
Expand Down

0 comments on commit 2ef2082

Please sign in to comment.