diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-11-28 14:57:07 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-12-05 12:54:34 -0500 |
commit | 971b744c9c7c2c3dc9f055f69c5630ca11f0a09e (patch) | |
tree | 8b8c8e88d6dbd809cc6bcd5a82ef512c6e3d9f65 /tests/text.rs | |
parent | 42b25717605bcb8206f71722f09d02ef4b4275f2 (diff) | |
download | vt100-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.rs | 11 |
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] |