summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordluyer <53582923+dluyer@users.noreply.github.com>2020-01-10 15:56:43 -0800
committerGitHub <noreply@github.com>2020-01-10 15:56:43 -0800
commit80f9820c41e55ca6dbac0108c6d515a62af0093d (patch)
treec6a08c67c78c9f29249a34ade6d51b5816f4c57c
parent5eab9f4b01d586420546448fd4838315062fdbad (diff)
downloadpexpect-git-80f9820c41e55ca6dbac0108c6d515a62af0093d.tar.gz
Add another regression test
-rwxr-xr-xtests/test_expect.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_expect.py b/tests/test_expect.py
index dc768a0..f16bf44 100755
--- a/tests/test_expect.py
+++ b/tests/test_expect.py
@@ -486,6 +486,12 @@ class ExpectTestCase (PexpectTestCase.PexpectTestCase):
child.sendeof()
child.expect(pexpect.EOF)
+ def test_searchwindowsize(self):
+ '''Tests that we don't match outside the window, a bug in 4.7.'''
+ p = pexpect.spawn('echo foobarbazbop')
+ e = p.expect([b'bar', b'bop'], searchwindowsize=6)
+ self.assertEqual(e, 1)
+
def _ordering(self, p):
p.timeout = 20
p.expect(b'>>> ')