summaryrefslogtreecommitdiff
path: root/test/t/test_apt_cache.py
blob: f9329f22bf8a8b59a00f8307e6974e18f421fd8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import pytest


@pytest.mark.bashcomp(cmd="apt-cache")
class TestAptCache:
    @pytest.mark.complete("apt-cache ")
    def test_1(self, completion):
        assert "search" in completion

    @pytest.mark.complete("apt-cache showsrc [", require_cmd=True)
    def test_2(self, completion):
        # Doesn't actually fail on grep errors, but takes a long time.
        assert not completion

    @pytest.mark.complete("apt-cache ", trail=" add foo")
    def test_special_at_point(self, completion):
        assert not completion