summaryrefslogtreecommitdiff
path: root/src/testdir/test_channel_pipe.py
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-02-13 17:04:46 +0100
committerBram Moolenaar <Bram@vim.org>2016-02-13 17:04:46 +0100
commit6463ca229cb9412581419497924c85fcbfc854ab (patch)
tree6c55cc23cf038e6f80ea954e670c691e72dc515a /src/testdir/test_channel_pipe.py
parent00af60bbb6cc7e8ccafddb30a1964f891b800bce (diff)
downloadvim-git-6463ca229cb9412581419497924c85fcbfc854ab.tar.gz
patch 7.4.1310v7.4.1310
Problem: Jobs don't open a channel. Solution: Create pipes and add them to the channel. Add ch_logfile(). Only Unix for now.
Diffstat (limited to 'src/testdir/test_channel_pipe.py')
-rw-r--r--src/testdir/test_channel_pipe.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/testdir/test_channel_pipe.py b/src/testdir/test_channel_pipe.py
new file mode 100644
index 000000000..495fa8012
--- /dev/null
+++ b/src/testdir/test_channel_pipe.py
@@ -0,0 +1,24 @@
+#!/usr/bin/python
+#
+# Server that will communicate over stdin/stderr
+#
+# This requires Python 2.6 or later.
+
+from __future__ import print_function
+import sys
+
+if __name__ == "__main__":
+
+ if len(sys.argv) > 1:
+ print(sys.argv[1])
+
+ while True:
+ typed = sys.stdin.readline()
+ if typed.startswith("quit"):
+ print("Goodbye!")
+ sys.stdout.flush()
+ break
+ if typed.startswith("echo"):
+ print(typed[5:-1])
+ sys.stdout.flush()
+