summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Kluyver <takowl@gmail.com>2014-06-04 17:10:53 -0700
committerThomas Kluyver <takowl@gmail.com>2014-06-04 17:10:53 -0700
commit9428d05b73098af08fbd3d9ee3cde30a3f122d24 (patch)
tree7d9eb487401436c8905175c4c7890e637c602166
parentd31c96f43bd6f83fbb81c9a88f66bbe29034b401 (diff)
downloadpexpect-9428d05b73098af08fbd3d9ee3cde30a3f122d24.tar.gz
Add another test for ANSI terminal emulation
-rwxr-xr-xtests/test_ansi.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_ansi.py b/tests/test_ansi.py
index 502c4b3..6830a65 100755
--- a/tests/test_ansi.py
+++ b/tests/test_ansi.py
@@ -129,6 +129,17 @@ class ansiTestCase (PexpectTestCase.PexpectTestCase):
s.process (c)
assert str(s) == tetris_target
+ def test_lines(self):
+ s = ANSI.ANSI(5, 5)
+ s.write('a'*6 + '\n')
+ s.write('ab\bcd\n')
+ s.write('ab\rcd\n')
+ assert str(s) == ('aaaaa\n'
+ 'a \n'
+ 'acd \n'
+ 'cd \n'
+ ' ')
+
if __name__ == '__main__':
unittest.main()