aboutsummaryrefslogtreecommitdiffstats
path: root/tests/text.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-11-29 04:40:39 -0500
committerJesse Luehrs <doy@tozt.net>2019-12-05 12:54:34 -0500
commit3fbc74f513a5a691dd99705598c3023f3b8bc173 (patch)
tree86f0ea6af9604bb2befa8798fe683daa50be76f2 /tests/text.rs
parentdc62fd174f6c5887e958b9b9bc8305ddd7c428a8 (diff)
downloadvt100-rust-3fbc74f513a5a691dd99705598c3023f3b8bc173.tar.gz
vt100-rust-3fbc74f513a5a691dd99705598c3023f3b8bc173.zip
handle wide char wrapping correctly
wrapping a wide char should set the wrapping state of the line even if it wrapped before the last column
Diffstat (limited to 'tests/text.rs')
-rw-r--r--tests/text.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/text.rs b/tests/text.rs
index 51ee297..d153f11 100644
--- a/tests/text.rs
+++ b/tests/text.rs
@@ -226,6 +226,10 @@ fn wrap() {
assert_eq!(parser.screen().cell(1, 2).unwrap().contents(), "a");
assert_eq!(parser.screen().cell(1, 3).unwrap().contents(), "");
+ let mut new_parser = vt100::Parser::default();
+ new_parser.process(&parser.screen().contents_formatted());
+ assert_eq!(new_parser.screen().contents(), parser.screen().contents());
+
parser.process(b"\x1b[H\x1b[J");
assert_eq!(parser.screen().contents(), "");
parser.process(b" ");