From 971b744c9c7c2c3dc9f055f69c5630ca11f0a09e Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Thu, 28 Nov 2019 14:57:07 -0500 Subject: fix a couple more issues with end of line behavior --- tests/text.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/text.rs') 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] -- cgit v1.2.3-54-g00ecf