From 7e7f4a10930498c2d576c7103054408a0915370e Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Wed, 6 Nov 2019 02:06:49 -0500 Subject: contents_formatted and contents_diff should also restore the cursor since the cursor is a visible part of the terminal --- tests/escape.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/escape.rs') diff --git a/tests/escape.rs b/tests/escape.rs index 01ac574..fcd4e6b 100644 --- a/tests/escape.rs +++ b/tests/escape.rs @@ -64,7 +64,7 @@ fn ris() { assert_eq!(parser.screen().contents(), "foo"); assert_eq!( parser.screen().contents_formatted(), - b"f\x1b[31;47;1;3;4moo" + b"\x1b[?25lf\x1b[31;47;1;3;4moo\x1b[21;21H" ); assert_eq!(parser.screen().title(), "window title"); @@ -172,13 +172,13 @@ fn decsc() { assert_eq!(parser.screen().cursor_position(), (0, 3)); assert_eq!( parser.screen().contents_formatted(), - b"\x1b[32mbar\r\n\r\n\r\n\r\n\x1b[31mfoo" + b"\x1b[32mbar\r\n\r\n\r\n\r\n\x1b[31mfoo\x1b[1;4H" ); parser.process(b"\x1b8\x1b[Hz"); assert_eq!(parser.screen().cursor_position(), (4, 1)); assert_eq!( parser.screen().contents_formatted(), - b"\x1b[32mbar\r\n\r\n\r\n\r\n\x1b[31mzoo" + b"\x1b[32mbar\r\n\r\n\r\n\r\n\x1b[31mzoo\x1b[5;2H" ); } -- cgit v1.2.3-54-g00ecf