From 61109c4bd4d60a79d7cb5f216a8286ddff6fb30b Mon Sep 17 00:00:00 2001 From: Mohamed Morsy Date: Tue, 12 Apr 2022 07:59:00 +0200 Subject: allow header_comment to be passed as an option to extract_message (#720) Fixes #82 Co-authored-by: Aarni Koskela --- tests/messages/test_frontend.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests') diff --git a/tests/messages/test_frontend.py b/tests/messages/test_frontend.py index 54a371f..4ed30ec 100644 --- a/tests/messages/test_frontend.py +++ b/tests/messages/test_frontend.py @@ -1518,3 +1518,12 @@ def test_extract_ignore_dirs(monkeypatch, capsys, tmp_path, with_underscore_igno # unless we opt in to ignore it again assert ('ssshhh....' in pot_content) != with_underscore_ignore assert ('_hidden_by_default' in pot_content) != with_underscore_ignore + + +def test_extract_header_comment(monkeypatch, tmp_path): + pot_file = tmp_path / 'temp.pot' + monkeypatch.chdir(project_dir) + cmdinst = configure_cli_command(f"extract . -o '{pot_file}' --header-comment 'Boing' ") + cmdinst.run() + pot_content = pot_file.read_text() + assert 'Boing' in pot_content -- cgit v1.2.1