diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-11-10 04:51:22 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-11-10 08:07:38 -0500 |
commit | b04c0e6e97765aeb888479c5e0bc27d54de60659 (patch) | |
tree | f8ebeae6cfaecd309152dd6cde5dd14cfdba3083 /tests/escape.rs | |
parent | 7cd6962a9ef544049bb637c17506f794f0a37f4d (diff) | |
download | vt100-rust-b04c0e6e97765aeb888479c5e0bc27d54de60659.tar.gz vt100-rust-b04c0e6e97765aeb888479c5e0bc27d54de60659.zip |
optimize cursor movement a bit
Diffstat (limited to 'tests/escape.rs')
-rw-r--r-- | tests/escape.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/escape.rs b/tests/escape.rs index 7a05491..1800ce8 100644 --- a/tests/escape.rs +++ b/tests/escape.rs @@ -153,20 +153,20 @@ fn decsc() { assert_eq!(parser.screen().cursor_position(), (4, 3)); assert_eq!( parser.screen().contents_formatted(), - b"\x1b[?25h\x1b[m\x1b[H\x1b[J\r\n\r\n\r\n\r\n\x1b[31mfoo" + b"\x1b[?25h\x1b[m\x1b[H\x1b[J\x1b[5;1H\x1b[31mfoo" ); parser.process(b"\x1b[32m\x1b[?6lbar"); assert_eq!(parser.screen().cursor_position(), (0, 3)); assert_eq!( parser.screen().contents_formatted(), - &b"\x1b[?25h\x1b[m\x1b[H\x1b[J\x1b[32mbar\r\n\r\n\r\n\r\n\x1b[31mfoo\x1b[1;4H"[..] + &b"\x1b[?25h\x1b[m\x1b[H\x1b[J\x1b[32mbar\x1b[5;1H\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[?25h\x1b[m\x1b[H\x1b[J\x1b[32mbar\r\n\r\n\r\n\r\n\x1b[31mzoo\x1b[5;2H"[..] + &b"\x1b[?25h\x1b[m\x1b[H\x1b[J\x1b[32mbar\x1b[5;1H\x1b[31mzoo\x1b[5;2H"[..] ); } |