aboutsummaryrefslogtreecommitdiffstats
path: root/t/__init__.py
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-10-20 18:21:42 -0400
committerJesse Luehrs <doy@tozt.net>2014-10-20 18:21:42 -0400
commite576b1d52a12c48b06c76e9f75fadb1428c5b0d4 (patch)
tree8644dd5157b4a918c5d3dc2e3dfb7a991326d066 /t/__init__.py
parent2b01a56de9184b9e2112b6ed75f70d1a46ffd198 (diff)
downloadlibvt100-python-e576b1d52a12c48b06c76e9f75fadb1428c5b0d4.tar.gz
libvt100-python-e576b1d52a12c48b06c76e9f75fadb1428c5b0d4.zip
test that .process returns the correct value in all cases
Diffstat (limited to 't/__init__.py')
-rw-r--r--t/__init__.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/__init__.py b/t/__init__.py
index 560d9da..130a085 100644
--- a/t/__init__.py
+++ b/t/__init__.py
@@ -5,3 +5,10 @@ import vt100
class VT100Test(unittest.TestCase):
def setUp(self):
self.vt = vt100.vt100(24, 80)
+
+ def process(self, text):
+ if type(text) == type(""):
+ length = len(text.encode("utf-8"))
+ else:
+ length = len(text)
+ assert self.vt.process(text) == length