Skip to content

Commit

Permalink
test(cli.current): add test for --long option
Browse files Browse the repository at this point in the history
  • Loading branch information
loqusion committed Apr 19, 2024
1 parent e544101 commit 4c629d4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/cli/current/test_current.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import re

import pytest
from click.testing import CliRunner

Expand Down Expand Up @@ -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())

0 comments on commit 4c629d4

Please sign in to comment.