summaryrefslogtreecommitdiffstats
path: root/test/t/test_look.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/t/test_look.py')
-rw-r--r--test/t/test_look.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/t/test_look.py b/test/t/test_look.py
new file mode 100644
index 0000000..fd6800e
--- /dev/null
+++ b/test/t/test_look.py
@@ -0,0 +1,16 @@
+import subprocess
+
+import pytest
+
+
+class TestLook:
+ @pytest.mark.complete("look foo")
+ def test_1(self, completion):
+ try:
+ subprocess.check_call(
+ "look foo 2>/dev/null | command grep -q ^foo", shell=True
+ )
+ except BaseException:
+ assert not completion
+ else:
+ assert completion