diff options
author | dluyer <53582923+dluyer@users.noreply.github.com> | 2020-01-10 15:56:43 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-10 15:56:43 -0800 |
commit | 80f9820c41e55ca6dbac0108c6d515a62af0093d (patch) | |
tree | c6a08c67c78c9f29249a34ade6d51b5816f4c57c /tests/test_expect.py | |
parent | 5eab9f4b01d586420546448fd4838315062fdbad (diff) | |
download | pexpect-80f9820c41e55ca6dbac0108c6d515a62af0093d.tar.gz |
Add another regression test
Diffstat (limited to 'tests/test_expect.py')
-rwxr-xr-x | tests/test_expect.py | 6 |
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'>>> ') |