diff options
author | aszlig <aszlig@redmoonstudios.org> | 2016-02-11 03:14:07 +0100 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2016-02-11 03:24:53 +0100 |
commit | 701138a380fac06023e5915448af92ba13614cb9 (patch) | |
tree | 44bfbcd7bc726164e098f981399b2c842d7db9be /urwid/tests | |
parent | c6d79bfe0ecd7dac2873e906f62a977dc41b19bd (diff) | |
download | urwid-701138a380fac06023e5915448af92ba13614cb9.tar.gz |
vterm: Fix handling of NUL characters
According to the VT100 programmers manual, the NUL character has to be
ignored (at least on our side, because we are not a printer):
http://vt100.net/docs/tp83/appendixb.html
According to the bug reporter the VMS console driver inserts NUL
characters after line feeds and our implementation prints those as "?".
Tested against Python 2.7, 3.2, 3.3, 3.4 and 3.5.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Reported-by: Robert Urban <urban@unix-beratung.de>
Diffstat (limited to 'urwid/tests')
-rw-r--r-- | urwid/tests/test_vterm.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/urwid/tests/test_vterm.py b/urwid/tests/test_vterm.py index 59fe166..4dadfcc 100644 --- a/urwid/tests/test_vterm.py +++ b/urwid/tests/test_vterm.py @@ -143,6 +143,10 @@ class TermTest(unittest.TestCase): self.write('1\n2\n3\n4\e[2;1f\e[2M') self.expect('1\n4') + def test_nul(self): + self.write('a\0b') + self.expect('ab') + def test_movement(self): self.write('\e[10;20H11\e[10;0f\e[20C\e[K') self.expect('\n' * 9 + ' ' * 19 + '1') |