diff options
Diffstat (limited to 'tests/messages/test_frontend.py')
-rw-r--r-- | tests/messages/test_frontend.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/messages/test_frontend.py b/tests/messages/test_frontend.py index fa0112c..deaa660 100644 --- a/tests/messages/test_frontend.py +++ b/tests/messages/test_frontend.py @@ -1383,3 +1383,12 @@ def test_extract_add_location(): assert isinstance(cmdinst, extract_messages) assert cmdinst.add_location == 'never' assert cmdinst.no_location + + +def test_extract_error_code(monkeypatch, capsys): + monkeypatch.chdir(project_dir) + cmdinst = configure_cli_command("compile --domain=messages --directory i18n --locale fi_BUGGY") + assert cmdinst.run() == 1 + out, err = capsys.readouterr() + # replace hack below for py2/py3 compatibility + assert "unknown named placeholder 'merkki'" in err.replace("u'", "'") |