Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: third_party/pexpect/tests/echo_w_prompt.py

Issue 1398903002: Add third_party/pexpect (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@end-to-end-test
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/pexpect/tests/depricated_test_filedescriptor.py ('k') | third_party/pexpect/tests/echo_wait.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/pexpect/tests/echo_w_prompt.py
diff --git a/third_party/pexpect/tests/echo_w_prompt.py b/third_party/pexpect/tests/echo_w_prompt.py
new file mode 100644
index 0000000000000000000000000000000000000000..3c8055357df996da096f02cfcb0b672cd78a74a5
--- /dev/null
+++ b/third_party/pexpect/tests/echo_w_prompt.py
@@ -0,0 +1,15 @@
+# -*- coding: utf-8 -*-
+from __future__ import print_function
+
+try:
+ raw_input
+except NameError:
+ raw_input = input
+
+while True:
+ try:
+ a = raw_input('<in >')
+ except EOFError:
+ print('<eof>')
+ break
+ print('<out>', a, sep='')
« no previous file with comments | « third_party/pexpect/tests/depricated_test_filedescriptor.py ('k') | third_party/pexpect/tests/echo_wait.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698