diff options
Diffstat (limited to 'tests/test_interact.py')
-rwxr-xr-x | tests/test_interact.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_interact.py b/tests/test_interact.py index e635cb0..21d083b 100755 --- a/tests/test_interact.py +++ b/tests/test_interact.py @@ -57,6 +57,18 @@ class InteractTestCase (PexpectTestCase.PexpectTestCase): assert not p.isalive() assert p.exitstatus == 0 + def test_interact_escape_None(self): + " Return only after Termination when `escape_character=None'. " + p = pexpect.spawn('{self.interact_py} --no-escape'.format(self=self), + timeout=5, env=self.env) + p.expect('<in >') + p.sendcontrol('d') + p.expect('<eof>') + p.expect_exact('Escaped interact') + p.expect(pexpect.EOF) + assert not p.isalive() + assert p.exitstatus == 0 + def test_interact_spawn_eof(self): " Ensure subprocess receives EOF and exit. " p = pexpect.spawn(self.interact_py, timeout=5, env=self.env) |