pkgs/clan: Add test for clan flash list

Add a test for `clan flash list`.
This tests the basic functionality, as well as that listing actually
works.
This commit is contained in:
a-kenji
2025-07-09 10:19:35 +02:00
parent 75501a914b
commit 3a52189ed6

View File

@@ -0,0 +1,23 @@
import pytest
from clan_cli.tests.helpers import cli
from clan_cli.tests.stdout import CaptureOutput
@pytest.mark.impure
def test_flash_list_languages(capture_output: CaptureOutput) -> None:
with capture_output as output:
cli.run(["flash", "list", "languages"])
assert "en_US.UTF-8" in output.out
assert "C" in output.out
languages = output.out.strip().split("\n")
assert len(languages) > 1
@pytest.mark.impure
def test_flash_list_keymaps(capture_output: CaptureOutput) -> None:
with capture_output as output:
cli.run(["flash", "list", "keymaps"])
assert "us" in output.out
keymaps = output.out.strip().split("\n")
assert len(keymaps) > 1