aboutsummaryrefslogtreecommitdiffstats
path: root/tests/text.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-11-13 12:58:55 -0500
committerJesse Luehrs <doy@tozt.net>2019-11-13 12:58:55 -0500
commitc5c02112a61221f231fdd8c6cd9bbaa604474d9d (patch)
tree14bab69c4250bc937204a4586a6c2e72ad66e402 /tests/text.rs
parent09bdb8ae8dda386583a458f04d9fc1f96804123d (diff)
downloadvt100-rust-c5c02112a61221f231fdd8c6cd9bbaa604474d9d.tar.gz
vt100-rust-c5c02112a61221f231fdd8c6cd9bbaa604474d9d.zip
fix zero width characters at the end of a row
Diffstat (limited to 'tests/text.rs')
-rw-r--r--tests/text.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/text.rs b/tests/text.rs
index e0b4cee..cf90b89 100644
--- a/tests/text.rs
+++ b/tests/text.rs
@@ -154,6 +154,14 @@ fn combining() {
let screen = parser.screen().clone();
parser.process(b"\x1bcabcdefg");
assert_eq!(parser.screen().contents_diff(&screen), b"");
+
+ parser.process(b"\x1bcaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
+ assert_eq!(parser.screen().cursor_position(), (0, 80));
+ assert_eq!(parser.screen().contents(), "a".repeat(80));
+
+ parser.process("\u{0301}".as_bytes());
+ assert_eq!(parser.screen().cursor_position(), (0, 80));
+ assert_eq!(parser.screen().contents(), format!("{}รก", "a".repeat(79)));
}
#[test]