diff options
author | Thomas Kluyver <takowl@gmail.com> | 2014-06-04 17:28:04 -0700 |
---|---|---|
committer | Thomas Kluyver <takowl@gmail.com> | 2014-06-04 17:28:04 -0700 |
commit | f96f9c53989c962f7f28d45df163d7f05b35d029 (patch) | |
tree | e570551264b986f220c293c25c3eea323bda90a5 /tests | |
parent | 9428d05b73098af08fbd3d9ee3cde30a3f122d24 (diff) | |
download | pexpect-git-f96f9c53989c962f7f28d45df163d7f05b35d029.tar.gz |
Test escaping interact mode
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/interact.py | 1 | ||||
-rwxr-xr-x | tests/test_interact.py | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/tests/interact.py b/tests/interact.py index 5cc5e29..60e48c9 100755 --- a/tests/interact.py +++ b/tests/interact.py @@ -32,6 +32,7 @@ import sys def main(): p = pexpect.spawn(sys.executable + ' echo_w_prompt.py', env=no_coverage_env()) p.interact() + print("Escaped interact") if __name__ == '__main__': main() diff --git a/tests/test_interact.py b/tests/test_interact.py index 39a1f76..623201b 100755 --- a/tests/test_interact.py +++ b/tests/test_interact.py @@ -43,6 +43,8 @@ class InteractTestCase (PexpectTestCase.PexpectTestCase): p.expect (b'<out>Hello') p.expect (b'<out>there') p.expect (b'<out>Mr. Python') + p.sendcontrol(']') + p.expect_exact('Escaped interact') assert p.isalive() p.sendeof () p.expect (pexpect.EOF) |