aboutsummaryrefslogtreecommitdiffstats
path: root/tests/basic.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-11-05 10:59:13 -0500
committerJesse Luehrs <doy@tozt.net>2019-11-05 10:59:13 -0500
commite12f9d9ee4e6b902436d0282e4a1e47ed7d54d6c (patch)
treece1f8a8eb3dc4c1ab20947e1a2a5a76606fc68cf /tests/basic.rs
parentb7359e5513e6102c293d51f0fbdabfccc3fe6450 (diff)
downloadvt100-rust-e12f9d9ee4e6b902436d0282e4a1e47ed7d54d6c.tar.gz
vt100-rust-e12f9d9ee4e6b902436d0282e4a1e47ed7d54d6c.zip
stop wrapping if the number of cols changes
Diffstat (limited to 'tests/basic.rs')
-rw-r--r--tests/basic.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/basic.rs b/tests/basic.rs
index afb090a..4478218 100644
--- a/tests/basic.rs
+++ b/tests/basic.rs
@@ -44,6 +44,25 @@ fn set_size() {
parser.process(b"\x1b[?1049l");
assert_eq!(parser.screen().size(), (24, 80));
assert_eq!(parser.screen().cursor_position(), (23, 4));
+
+ parser.screen_mut().set_size(34, 8);
+ parser.process(b"\x1bc01234567890123456789");
+ assert_eq!(
+ parser.screen().contents(0, 0, 33, 7),
+ "01234567890123456789"
+ );
+
+ parser.screen_mut().set_size(24, 80);
+ assert_eq!(
+ parser.screen().contents(0, 0, 23, 79),
+ "01234567\n89012345\n6789"
+ );
+
+ parser.screen_mut().set_size(34, 8);
+ assert_eq!(
+ parser.screen().contents(0, 0, 23, 79),
+ "01234567\n89012345\n6789"
+ );
}
#[test]