aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-09-16 20:45:45 -0400
committerJesse Luehrs <doy@tozt.net>2014-09-16 20:45:45 -0400
commitc6f0e2b53d71eacb1b8ad7e6487e0416b79cdb7c (patch)
treef58317379bdf797f2ba84c934ecf4a9fdc8f535e
parent601f39ad6fdf605f4a32809f16bada8bb9fb22d5 (diff)
downloadlibvt100-python-c6f0e2b53d71eacb1b8ad7e6487e0416b79cdb7c.tar.gz
libvt100-python-c6f0e2b53d71eacb1b8ad7e6487e0416b79cdb7c.zip
test script
-rw-r--r--test.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/test.py b/test.py
new file mode 100644
index 0000000..2c43bab
--- /dev/null
+++ b/test.py
@@ -0,0 +1,11 @@
+import hexdump
+
+import vt100
+
+vt = vt100.vt100(24, 80)
+string = b"foo\033[31m\033[32mb\033[3;7;42ma\033[23mr"
+vt.process(string)
+
+hexdump.hexdump(vt.get_string_plaintext(0, 0, 0, 50))
+hexdump.hexdump(vt.get_string_formatted(0, 0, 0, 50))
+print(vt.cell(0, 4).contents())