aboutsummaryrefslogtreecommitdiffstats
path: root/tests/text.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-11-29 03:55:02 -0500
committerJesse Luehrs <doy@tozt.net>2019-12-05 12:54:34 -0500
commita9b6d72b24fffa55093201c520075d500712a3ff (patch)
tree5169f448939401b90bfa683121b3e00b05e20499 /tests/text.rs
parent971b744c9c7c2c3dc9f055f69c5630ca11f0a09e (diff)
downloadvt100-rust-a9b6d72b24fffa55093201c520075d500712a3ff.tar.gz
vt100-rust-a9b6d72b24fffa55093201c520075d500712a3ff.zip
track fullwidth continuation cells explicitly
this makes the logic a bit easier to follow
Diffstat (limited to 'tests/text.rs')
-rw-r--r--tests/text.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/text.rs b/tests/text.rs
index 4206925..5f5dbef 100644
--- a/tests/text.rs
+++ b/tests/text.rs
@@ -232,6 +232,20 @@ fn wrap() {
assert_eq!(parser.screen().contents(), " ");
parser.process(b" ");
assert_eq!(parser.screen().contents(), " \n\n\n ");
+
+ parser.process(b"\x1b[H\x1b[J");
+ assert_eq!(parser.screen().contents(), "");
+ let screen = parser.screen().clone();
+ parser.process("ネa\x1b[L\x1b[1;79Hbcd".as_bytes());
+ assert_eq!(parser.screen().contents(), " bcd a");
+ assert_eq!(
+ parser.screen().contents_formatted(),
+ "\x1b[?25h\x1b[m\x1b[H\x1b[J\x1b[78Cbcd\x1b[Ca\x1b[2;2H".as_bytes()
+ );
+ assert_eq!(
+ parser.screen().contents_diff(&screen),
+ "\x1b[78Cbcd\x1b[Ca\x1b[2;2H".as_bytes()
+ );
}
#[test]