summaryrefslogtreecommitdiff
path: root/test/t/test_explodepkg.py
blob: 29463dfdf1b4e61b2bcc4c9fa42284b42a52d75b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import fnmatch
import os

import pytest


class TestExplodepkg:
    @pytest.mark.complete("explodepkg ", cwd="slackware/home")
    def test_1(self, completion):
        expected = sorted(
            x
            for x in os.listdir("slackware/home")
            if os.path.isdir("./%s" % x)
            or (
                os.path.isfile("./%s" % x) and fnmatch.fnmatch(x, "*.t[bglx]z")
            )
        )
        assert completion == expected