diff options
| author | Christoph Schlosser <christoph@linux.com> | 2025-10-10 17:19:27 +0200 |
|---|---|---|
| committer | Christoph Schlosser <christoph@linux.com> | 2025-10-10 17:19:27 +0200 |
| commit | 85da4abc206f2cc8819836bb0e8727de3a51d24c (patch) | |
| tree | 6c4884cef49da8ccb1f21bc180d4b6a5681bd267 /tests | |
| parent | 2a076517255c4585ac2bc475aaafdc728b6dae6f (diff) | |
| download | git2hugo-85da4abc206f2cc8819836bb0e8727de3a51d24c.tar.gz | |
g2h: Render markdown files instead of putting them into code blocks
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/file_page_test.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/file_page_test.py b/tests/file_page_test.py index daa9b6c..5c380b8 100644 --- a/tests/file_page_test.py +++ b/tests/file_page_test.py @@ -94,3 +94,15 @@ def test_backticks_in_text_content(): file.data_stream.read.return_value = '```'.encode() context = page.context() assert(context['backtick_max'] == 4) + +def test_markdown(): + file = MagicMock() + tree = MagicMock() + commit = MagicMock() + commit.hexsha = '123' + commit.tree = tree + commit.tree.join.return_value = file + page = FilePage('test/file', 'file test', commit, 'file.Md', '', 'file/content') + file.data_stream.read.return_value = '```'.encode() + context = page.context() + assert(context['backtick_max'] == 0) |