diff options
Diffstat (limited to 'test/t/test_export.py')
-rw-r--r-- | test/t/test_export.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/test/t/test_export.py b/test/t/test_export.py index 8738913..8abb564 100644 --- a/test/t/test_export.py +++ b/test/t/test_export.py @@ -1,5 +1,7 @@ import pytest +from conftest import assert_bash_exec + class TestExport: @pytest.mark.complete("export BASH") @@ -22,10 +24,9 @@ class TestExport: def test_5(self, completion): assert completion == ["foo", "foo.d/"] - @pytest.mark.complete("export -fn _ex") + @pytest.mark.complete("export -fn _comp_cmd_ex") def test_6(self, completion): - assert "_expand" in completion - assert "_export" in completion + assert completion == "port" @pytest.mark.complete(r"export FOO=$BASH") def test_7(self, completion): @@ -34,3 +35,13 @@ class TestExport: @pytest.mark.complete("export -", require_cmd=True) def test_8(self, completion): assert completion + + @pytest.fixture(scope="class") + def export_f_canary(self, request, bash): + assert_bash_exec(bash, "_comp__test_export_f_canary() { return; }") + + @pytest.mark.complete("export -f _comp__test_export_f_canar") + def test_no_equals_sign_for_function(self, completion, export_f_canary): + assert completion + assert "=" not in "".join(completion) + assert completion.endswith(" ") |