๐Ÿ“ฆ scop / bash-completion

๐Ÿ“„ test_sha256sum.py ยท 23 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23import pytest


class TestSha256sum:
    @pytest.mark.complete("sha256sum --", require_longopt=True)
    def test_options(self, completion):
        assert completion

    @pytest.mark.complete("sha256sum ", cwd="sha256sum")
    def test_summing(self, completion):
        assert completion == ["dir/", "foo"]

    @pytest.mark.complete("sha256sum -c ", cwd="sha256sum")
    def test_checking(self, completion):
        assert completion == [
            "checksums",
            "checksums.txt",
            "dir/",
            "foo.sha256",
            "sha256sums",
            "sha256sums.txt",
        ]