summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMohamed Morsy <muhamed.hafez+github@gmail.com>2022-04-12 07:59:00 +0200
committerGitHub <noreply@github.com>2022-04-12 08:59:00 +0300
commit61109c4bd4d60a79d7cb5f216a8286ddff6fb30b (patch)
tree6a2dd27cc768d1765191410a78990cdeb1134298 /tests
parent20352cc667cd3f35c190b966cfc042cc3f2400a5 (diff)
downloadbabel-61109c4bd4d60a79d7cb5f216a8286ddff6fb30b.tar.gz
allow header_comment to be passed as an option to extract_message (#720)
Fixes #82 Co-authored-by: Aarni Koskela <akx@iki.fi>
Diffstat (limited to 'tests')
-rw-r--r--tests/messages/test_frontend.py9
1 files changed, 9 insertions, 0 deletions
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