aboutsummaryrefslogtreecommitdiffstats
path: root/tests/weird.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/weird.rs')
-rw-r--r--tests/weird.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/weird.rs b/tests/weird.rs
new file mode 100644
index 0000000..20cc571
--- /dev/null
+++ b/tests/weird.rs
@@ -0,0 +1,17 @@
+#[test]
+fn intermediate_control() {
+ let mut screen = vt100::Screen::new(24, 80);
+ assert_eq!(screen.cursor_position(), (0, 0));
+
+ screen.process(b"\x1b");
+ assert_eq!(screen.cursor_position(), (0, 0));
+
+ screen.process(b"[");
+ assert_eq!(screen.cursor_position(), (0, 0));
+
+ screen.process(b"\n");
+ assert_eq!(screen.cursor_position(), (1, 0));
+
+ screen.process(b"C");
+ assert_eq!(screen.cursor_position(), (1, 1));
+}