๐Ÿ“ฆ scop / bash-completion

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


@pytest.mark.bashcomp(
    pre_cmds=(
        # Make sure our own ./configure is in PATH
        "PATH=$PWD/../..:$PATH",
    )
)
class TestConfigure:
    @pytest.mark.complete("configure --", require_cmd=True)
    def test_1(self, completion):
        assert completion

    @pytest.mark.complete("configure --prefix ")
    def test_2(self, completion):
        assert completion

    @pytest.mark.complete("configure --unknown-option-with-split=")
    def test_unknown_split_filedir_fallback(self, completion):
        assert "shared/" in completion

    @pytest.mark.complete("configure --unknown-option ")
    def test_unknown_filedir_fallback(self, completion):
        assert "shared/" in completion