diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-11-29 03:55:02 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-12-05 12:54:34 -0500 |
commit | a9b6d72b24fffa55093201c520075d500712a3ff (patch) | |
tree | 5169f448939401b90bfa683121b3e00b05e20499 /tests | |
parent | 971b744c9c7c2c3dc9f055f69c5630ca11f0a09e (diff) | |
download | vt100-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')
-rw-r--r-- | tests/text.rs | 14 |
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] |