/
githubmirror
/
bash-completion
Обзор
Документация
Войти
/
githubmirror
/
bash-completion
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/t/test_info.py
20 строк
564 B
Ville Skyttä
test(typos): work around false positives cropped up in 1.15.x
09 июл 2023, 11:02
09 июл 2023, 11:02
ac87367
Код
Авторство
О чём код?
import pytest @pytest.mark.bashcomp(pre_cmds=("INFOPATH+=:$PWD/info:",)) class TestInfo: @pytest.mark.complete("info bash") def test_1(self, completion): assert completion @pytest.mark.complete("info -", require_cmd=True) def test_2(self, completion): assert completion @pytest.mark.complete( "info nonexistent-na", env=dict(INFOPATH="'$(echo malicious code >/dev/tty)'"), ) def test_infopath_code_injection(self, completion): # no completion, no space appended assert not completion