summaryrefslogtreecommitdiffstats
path: root/test/t/test_kpdf.py
blob: b7e658fd62523b740e693682b2894813fe416512 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import pytest

from conftest import assert_complete, create_dummy_filedirs


@pytest.mark.bashcomp(temp_cwd=True)
class TestKpdf:
    def test_1(self, bash):
        files, dirs = create_dummy_filedirs(
            ".eps .EPS .pdf .PDF .ps .PS .txt".split(),
            "foo".split(),
        )

        completion = assert_complete(bash, "kpdf ")
        assert completion == [
            x
            for x in sorted(files + ["%s/" % d for d in dirs])
            if x.lower() != ".txt"
        ]