summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThomas Kluyver <takowl@gmail.com>2013-10-21 12:19:45 -0700
committerThomas Kluyver <takowl@gmail.com>2013-10-21 12:19:45 -0700
commit84308e64d3ed10bc7f75d930269abb15e7b2bf8a (patch)
tree0bea906f446c7e035467b6c4e736705d34c01bd9 /tests
parentc71562035250942080601a2254c84a12bccb0b46 (diff)
downloadpexpect-84308e64d3ed10bc7f75d930269abb15e7b2bf8a.tar.gz
Test our own pty fork implementation
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test_misc.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_misc.py b/tests/test_misc.py
index 377bb0c..a802357 100755
--- a/tests/test_misc.py
+++ b/tests/test_misc.py
@@ -283,6 +283,17 @@ class TestCaseMisc(PexpectTestCase.PexpectTestCase):
'5: "other"\n 6: TIMEOUT')
assert ss.__str__() == out, (ss.__str__(), out)
+ def test_nonnative_pty_fork(self):
+ class spawn_ourptyfork(pexpect.spawn):
+ def _spawn(self, command, args=[]):
+ self.use_native_pty_fork = False
+ pexpect.spawn._spawn(self, command, args)
+
+ p = spawn_ourptyfork('cat')
+ p.sendline('abc')
+ p.expect('abc')
+ p.sendeof()
+
if __name__ == '__main__':
unittest.main()