aboutsummaryrefslogtreecommitdiffstats
path: root/tests/init.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-11-05 12:53:25 -0500
committerJesse Luehrs <doy@tozt.net>2019-11-05 13:26:49 -0500
commit2e7f1686d719497d9b2d2d2c8ffba20e6c8214bd (patch)
tree8f31cb37faaec73bdf4a5253f0c34bceb3cc6d6f /tests/init.rs
parente12f9d9ee4e6b902436d0282e4a1e47ed7d54d6c (diff)
downloadvt100-rust-2e7f1686d719497d9b2d2d2c8ffba20e6c8214bd.tar.gz
vt100-rust-2e7f1686d719497d9b2d2d2c8ffba20e6c8214bd.zip
adjust the way window contents are reported
contents and contents_formatted now only allow getting the entire terminal contents, and for any other uses we now provide rows and rows_formatted. the reasoning here is that it wasn't particularly useful to return newline (or crlf) separated lines when not drawing the full terminal, since it's not like you can send those to the terminal in any meaningful way anyway (like, if you wanted to draw a subset of the terminal state, you'll almost certainly need to be doing explicit positioning on your own, since crlf is only actually correct if you're drawing the screen subset in the upper left hand corner of the screen). with this, you can draw each (subset of a) line individually, and reposition the cursor in whatever way makes sense in between drawing the lines.
Diffstat (limited to 'tests/init.rs')
-rw-r--r--tests/init.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/init.rs b/tests/init.rs
index 61395e4..9647765 100644
--- a/tests/init.rs
+++ b/tests/init.rs
@@ -15,8 +15,8 @@ fn init() {
let cell = parser.screen().cell(0, 80);
assert!(cell.is_none());
- assert_eq!(parser.screen().contents(0, 0, 23, 79), "");
- assert_eq!(parser.screen().contents_formatted(0, 0, 23, 79), b"");
+ assert_eq!(parser.screen().contents(), "");
+ assert_eq!(parser.screen().contents_formatted(), b"");
assert_eq!(parser.screen().title(), "");
assert_eq!(parser.screen().icon_name(), "");