diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-11-03 16:08:57 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-11-03 16:08:57 -0500 |
commit | 7958770a507d17e4beed17009206322c6d8fb7c0 (patch) | |
tree | 751d57929e56ec7d67c48b6c4f7a256de2f2dda1 /tests/escape.rs | |
parent | 2f1eee8fcd050ac6e7411b700857e7c1db465d24 (diff) | |
download | vt100-rust-7958770a507d17e4beed17009206322c6d8fb7c0.tar.gz vt100-rust-7958770a507d17e4beed17009206322c6d8fb7c0.zip |
decsc should also save graphic rendition and origin mode
Diffstat (limited to 'tests/escape.rs')
-rw-r--r-- | tests/escape.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/escape.rs b/tests/escape.rs index 6793b5c..6c70aee 100644 --- a/tests/escape.rs +++ b/tests/escape.rs @@ -175,4 +175,25 @@ fn decsc() { screen.process(b"\x1b8"); assert_eq!(screen.cursor_position(), (0, 3)); + + screen.process(b"\x1bc\x1b[31m\x1b[5;15r\x1b[?6hfoo\x1b7"); + assert_eq!(screen.cursor_position(), (4, 3)); + assert_eq!( + screen.contents_formatted(0, 0, 23, 79), + "\n\n\n\n\x1b[31mfoo\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + ); + + screen.process(b"\x1b[32m\x1b[?6lbar"); + assert_eq!(screen.cursor_position(), (0, 3)); + assert_eq!( + screen.contents_formatted(0, 0, 23, 79), + "\x1b[32mbar\n\n\n\n\x1b[31mfoo\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + ); + + screen.process(b"\x1b8\x1b[Hz"); + assert_eq!(screen.cursor_position(), (4, 1)); + assert_eq!( + screen.contents_formatted(0, 0, 23, 79), + "\x1b[32mbar\n\n\n\n\x1b[31mzoo\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + ); } |