mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
Add unit test for --version
This commit is contained in:
parent
fb3cb98793
commit
c08fddb443
1 changed files with 9 additions and 0 deletions
|
@ -3,6 +3,7 @@ from __future__ import annotations
|
|||
import contextlib
|
||||
import copy
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import sys
|
||||
import tempfile
|
||||
|
@ -163,6 +164,14 @@ class TestCliBasic(TestCli):
|
|||
for line in plain_lines:
|
||||
assert len(line) == banner_width, "banner has inconsistent width"
|
||||
|
||||
def test_version(self) -> None:
|
||||
result = self.run_cli("--version")
|
||||
result.assert_success()
|
||||
|
||||
with open("share/version.txt") as f:
|
||||
version = f.read().strip()
|
||||
assert version in result.stdout
|
||||
|
||||
|
||||
class TestCliConversion(TestCliBasic):
|
||||
def test_invalid_lang(self) -> None:
|
||||
|
|
Loading…
Reference in a new issue