/
githubmirror
/
bash-completion
Обзор
Документация
Войти
/
githubmirror
/
bash-completion
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/t/unit/test_unit_unlocal.py
18 строк
462 B
Seamus Connor
fix: Properly handle environments with unset IFS
26 янв 2022, 00:19
26 янв 2022, 00:19
a7aabbc
Код
Авторство
О чём код?
import pytest from conftest import assert_bash_exec @pytest.mark.bashcomp(cmd=None, ignore_env=r"^\+(VAR=|declare -f foo)") class TestUnlocal: def test_1(self, bash): cmd = ( "foo() { " "local VAR=inner; " "_comp_unlocal VAR; " "echo $VAR; " "}; " "VAR=outer; foo; " ) res = assert_bash_exec(bash, cmd, want_output=True).strip() assert res == "outer"