From 80f9820c41e55ca6dbac0108c6d515a62af0093d Mon Sep 17 00:00:00 2001 From: dluyer <53582923+dluyer@users.noreply.github.com> Date: Fri, 10 Jan 2020 15:56:43 -0800 Subject: Add another regression test --- tests/test_expect.py | 6 ++++++ 1 file changed, 6 insertions(+) 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'>>> ') -- cgit v1.2.1