summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJeff Quast <contact@jeffquast.com>2015-10-12 20:23:49 -0700
committerJeff Quast <contact@jeffquast.com>2015-10-12 20:23:49 -0700
commit64f598334d464016b097cec19861fe924526998e (patch)
tree62b5c47271dd96154d0878d0a9878577f9e6a9c8 /tests
parent75094b01cf2f3960faeaf0eadd0222ad73ebe4ce (diff)
downloadpexpect-git-64f598334d464016b097cec19861fe924526998e.tar.gz
issue discovered during integration with telnetlib3
Diffstat (limited to 'tests')
-rw-r--r--tests/test_async.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_async.py b/tests/test_async.py
index ce75572..b918da6 100644
--- a/tests/test_async.py
+++ b/tests/test_async.py
@@ -43,9 +43,15 @@ class AsyncTests(PexpectTestCase):
coro = p.expect('Blah', async=True)
with self.assertRaises(pexpect.EOF):
run(coro)
-
+
def test_expect_exact(self):
p = pexpect.spawn('%s list100.py' % sys.executable)
assert run(p.expect_exact(b'5', async=True)) == 0
assert run(p.expect_exact(['wpeok', b'11'], async=True)) == 1
assert run(p.expect_exact([b'foo', pexpect.EOF], async=True)) == 1
+
+ def test_async_utf8(self):
+ p = pexpect.spawn('%s list100.py' % sys.executable, encoding='utf8')
+ assert run(p.expect_exact(u'5', async=True)) == 0
+ assert run(p.expect_exact([u'wpeok', u'11'], async=True)) == 1
+ assert run(p.expect_exact([u'foo', pexpect.EOF], async=True)) == 1