Skip to content

Commit

Permalink
Test if htmd works in child directories
Browse files Browse the repository at this point in the history
  • Loading branch information
Siecje committed Jan 11, 2024
1 parent eb44fb4 commit 4b2fa09
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,3 +422,14 @@ def test_build_day_404_no_posts():
result = runner.invoke(build)
assert result.exit_code == 1
assert result.output == expected_output


def test_build_from_sub_directory():
runner = CliRunner()
with runner.isolated_filesystem():
runner.invoke(start)
current_directory = os.getcwd()
os.chdir(os.path.join(current_directory, 'posts'))
result = runner.invoke(build)
assert result.exit_code == 0
assert re.search(SUCCESS_REGEX, result.output)

0 comments on commit 4b2fa09

Please sign in to comment.