aboutsummaryrefslogtreecommitdiffstats
path: root/tests/text.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-11-28 14:57:07 -0500
committerJesse Luehrs <doy@tozt.net>2019-12-05 12:54:34 -0500
commit971b744c9c7c2c3dc9f055f69c5630ca11f0a09e (patch)
tree8b8c8e88d6dbd809cc6bcd5a82ef512c6e3d9f65 /tests/text.rs
parent42b25717605bcb8206f71722f09d02ef4b4275f2 (diff)
downloadvt100-rust-971b744c9c7c2c3dc9f055f69c5630ca11f0a09e.tar.gz
vt100-rust-971b744c9c7c2c3dc9f055f69c5630ca11f0a09e.zip
fix a couple more issues with end of line behavior
Diffstat (limited to 'tests/text.rs')
-rw-r--r--tests/text.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/text.rs b/tests/text.rs
index 1ad16ae..4206925 100644
--- a/tests/text.rs
+++ b/tests/text.rs
@@ -221,6 +221,17 @@ fn wrap() {
assert_eq!(parser.screen().cell(1, 1).unwrap().contents(), "");
assert_eq!(parser.screen().cell(1, 2).unwrap().contents(), "a");
assert_eq!(parser.screen().cell(1, 3).unwrap().contents(), "");
+
+ parser.process(b"\x1b[H\x1b[J");
+ assert_eq!(parser.screen().contents(), "");
+ parser.process(b" ");
+ assert_eq!(parser.screen().contents(), " ");
+ parser.process(b"\n");
+ assert_eq!(parser.screen().contents(), " ");
+ parser.process(b"\n");
+ assert_eq!(parser.screen().contents(), " ");
+ parser.process(b" ");
+ assert_eq!(parser.screen().contents(), " \n\n\n ");
}
#[test]