From 4c629d42c7994e1586edfb99c0afe3ce2fcdd39e Mon Sep 17 00:00:00 2001 From: loqusion <38332081+loqusion@users.noreply.github.com> Date: Fri, 19 Apr 2024 09:10:46 -0500 Subject: [PATCH] test(cli.current): add test for `--long` option --- tests/cli/current/test_current.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/cli/current/test_current.py b/tests/cli/current/test_current.py index 2664574..d3e1853 100644 --- a/tests/cli/current/test_current.py +++ b/tests/cli/current/test_current.py @@ -1,3 +1,5 @@ +import re + import pytest from click.testing import CliRunner @@ -25,3 +27,12 @@ def test_it(runner: CliRunner, shader_path_factory: ShaderPathFactory): assert result.exit_code == 0 assert result.output.strip() == "shader1" + + +def test_long(runner: CliRunner, shader_path_factory: ShaderPathFactory): + shader_path = shader_path_factory("foo") + hyprctl.set_screen_shader(str(shader_path)) + result = runner.invoke(cli, ["current", "--long"]) + + assert result.exit_code == 0 + assert re.match(rf"^foo\s+.*{re.escape(str(shader_path))}", result.output.strip())