summaryrefslogtreecommitdiffstats
path: root/tests/cli_tests/test_shell_pipeline.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cli_tests/test_shell_pipeline.py')
-rw-r--r--tests/cli_tests/test_shell_pipeline.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/cli_tests/test_shell_pipeline.py b/tests/cli_tests/test_shell_pipeline.py
new file mode 100644
index 0000000..8fe5e14
--- /dev/null
+++ b/tests/cli_tests/test_shell_pipeline.py
@@ -0,0 +1,21 @@
+import pexpect
+
+
+def test_running_disable_shell_pipeline():
+ cli = pexpect.spawn("iredis -n 15 --no-shell", timeout=2)
+ cli.expect("127.0.0.1")
+ cli.sendline("set foo hello")
+ cli.expect("OK")
+ cli.sendline("get foo | grep w")
+ cli.expect(r"hello")
+ cli.close()
+
+
+def test_running_disable_shell_pipeline_with_decode_option():
+ cli = pexpect.spawn("iredis -n 15 --decode=utf-8", timeout=2)
+ cli.expect("127.0.0.1")
+ cli.sendline("set foo hello")
+ cli.expect("OK")
+ cli.sendline("get foo | cat")
+ cli.expect(r"hello")
+ cli.close()