diff options
Diffstat (limited to 'test/t/test_upgradepkg.py')
-rw-r--r-- | test/t/test_upgradepkg.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/t/test_upgradepkg.py b/test/t/test_upgradepkg.py index 4c72a158..87fe8e4c 100644 --- a/test/t/test_upgradepkg.py +++ b/test/t/test_upgradepkg.py @@ -32,3 +32,20 @@ class TestUpgradepkg: ] ) assert completion == expected + + @pytest.mark.complete("upgradepkg foo%", cwd="slackware/home") + def test_after_percent(self, completion): + expected = sorted( + [ + "%s/" % x + for x in os.listdir("slackware/home") + if os.path.isdir("./slackware/home/%s" % x) + ] + + [ + x + for x in os.listdir("slackware/home") + if os.path.isfile("./slackware/home/%s" % x) + and fnmatch.fnmatch(x, "*.t[bglx]z") + ] + ) + assert completion == ["foo%%%s" % x for x in expected] |