From f4acb49ea148cdd899f7f29f1591c7bc853c2135 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 03:03:18 +0200 Subject: Adding upstream version 1:2.12.0. Signed-off-by: Daniel Baumann --- test/t/test_help.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/t/test_help.py (limited to 'test/t/test_help.py') diff --git a/test/t/test_help.py b/test/t/test_help.py new file mode 100644 index 0000000..b056c55 --- /dev/null +++ b/test/t/test_help.py @@ -0,0 +1,21 @@ +import pytest + + +class TestHelp: + @pytest.mark.complete("help ") + def test_basic(self, completion): + assert "help" in completion + + @pytest.mark.complete("help -") + def test_options(self, completion): + assert completion + + @pytest.mark.complete( + r"help \(", + skipif="! compgen -A helptopic | grep -qxF '(( ... ))'", # bash 4.2 + ) + def test_parens(self, completion): + # Assumption: an item like "(( ... ))" exists in the output + assert any( + x.startswith(r"\(") and x.endswith(r"\)\)") for x in completion + ) -- cgit v1.2.3